Data processing method and related device

By pre-extracting and caching the features of data objects during data processing, the problem of repeated feature extraction by multiple operators is solved, thus improving the efficiency of data processing.

CN121597720APending Publication Date: 2026-03-03HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411164505.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Because large-scale datasets involve many processing steps, existing technologies have relatively low data processing efficiency.

Method used

Features of data objects are extracted and cached in advance, and multiple operators share the cached features, avoiding repeated execution of the feature extraction process.

Benefits of technology

This improves the efficiency of data processing and reduces the time overhead of repeatedly executing feature extraction by multiple operators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597720A_ABST
    Figure CN121597720A_ABST
Patent Text Reader

Abstract

A data processing method is applied to improving data processing efficiency in scenes such as model training, model reasoning or data query. According to the method, for a data set needing to be processed by a plurality of operators, feature extraction is conducted on data objects in the data set in advance, features of each data object are obtained and cached, and the cached features of the data objects are features which can be repeatedly used when the plurality of operators process the data set. Therefore, when any one of the plurality of operators needs to process the data set based on the features of the data object, the features of the corresponding data object can be sent to the operator, the process that each operator independently executes feature extraction is avoided, the situation that the plurality of operators repeatedly execute feature extraction on the data set is avoided, and the processing efficiency is improved. Therefore, the data processing efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data processing method and related apparatus. Background Technology

[0002] In the field of artificial intelligence (AI) technology, large models refer to machine learning models with complex computational structures and extremely large-scale parameters (typically exceeding one billion). Large models are capable of processing massive amounts of data and performing various complex tasks, such as natural language processing and image recognition.

[0003] Currently, the performance of large-scale model training and inference is highly dependent on data quality. High-quality, large-scale, and diverse datasets can effectively improve the accuracy of large models and reduce their training time. Because large models require high-quality and large-scale datasets, it is often necessary to process the pre-collected datasets (e.g., by removing and modifying data) before using them for training and inference, so that the input datasets for the large model can meet its requirements.

[0004] However, in related technologies, due to the large size of the datasets to be processed and the numerous steps involved in processing them, the time cost of processing the datasets is currently very high, resulting in low data processing efficiency. Summary of the Invention

[0005] This application provides a data processing method that can improve data processing efficiency.

[0006] The first aspect of this application provides a data processing method for improving data processing efficiency in scenarios such as model training, model inference, or data querying. The data processing method includes: an execution device acquiring multiple data objects, which are pre-collected and subsequently processed by multiple operators. The multiple operators refer to operators that perform processing operations such as elimination or modification on the multiple data objects according to pre-defined rules; specifically, they are execution entities such as operators, processes, or threads.

[0007] Then, the execution device performs feature extraction on each of the multiple data objects, obtaining and caching at least one feature for each data object. This at least one feature of a data object is a feature that is repeatedly used by multiple operators when processing the multiple data objects, and the multiple operators are used to collaboratively execute the processing of the multiple data objects. That is, in the overall process of multiple operators processing the multiple data objects, at least one feature obtained by feature extraction on the data object will be used at least twice.

[0008] Secondly, the execution device obtains a first request message from a first operator among multiple operators. The first request message is used to request the acquisition of a target feature of a data object in a first data set. The first data set includes at least one data object among multiple data objects, and the target feature belongs to at least one feature extracted above.

[0009] Thus, based on at least one feature of each cached data object, the execution device sends the target features of the data objects in the first data set to the first operator, which is used to remove or modify the data objects in the first data set based on the target features of the data objects in the first data set.

[0010] In this scheme, for datasets that need to be processed by multiple operators, features are pre-extracted from the data objects in the dataset. The features of each data object are obtained and cached, and these cached features are those that will be repeatedly used by multiple operators when processing the dataset. Thus, when any of the multiple operators needs to process the dataset based on the features of the data objects, it can directly retrieve the corresponding data object features from the cache and send them to the operator. This eliminates the need for each operator to independently perform feature extraction, thereby avoiding multiple operators repeatedly performing feature extraction on the dataset and effectively improving data processing efficiency.

[0011] In one possible implementation, the target feature is a feature that the first operator will repeatedly use when processing any data object to be processed, and / or the target feature is a feature that both the first and second operators will use when processing the data object; wherein, the multiple operators include the second operator.

[0012] In other words, the first operator reuses the target features of the data object when processing the data object; or, both the first and second operators use the target features of the data object when processing the data object; or, the first operator reuses the target features of the data object when processing the data object, and the second operator also uses the target features of the data object when processing the data object.

[0013] In this solution, for each data object, target features that may be reused by one operator or used by multiple operators during the processing are extracted in advance. This enables feature extraction to be performed only once on the data object, which can meet the feature usage requirements in the subsequent data processing process and effectively avoid the additional time overhead caused by multiple operators repeatedly performing feature extraction.

[0014] In one possible implementation, a first operator is used to remove some data objects from the first data set based on target features of the data objects in the first data set to obtain a second data set. After the first operator completes the processing of the first data set, the execution device receives a second request message from a second operator, which requests the extraction of target features of the data objects in the second data set. The second operator is one of multiple operators, and the second data set is obtained after the first operator removes data objects from the first data set. That is, after removing data objects from the first data set, the first operator obtains the second data set, and the first operator transmits the second data set to the second operator so that the second operator can continue processing the data objects in the second data set. Furthermore, the target features are of a fixed type, such as word segmentation results or word count. Therefore, for different data objects, the target features corresponding to each data object can be extracted.

[0015] Based on at least one feature of each cached data object, the execution device sends the target features of the data objects in the second data set to the second operator, which is used to remove or modify the data objects in the second data set based on the target features of the data objects in the second data set.

[0016] In this scheme, during the collaborative data processing of multiple operators, by pre-extracting and caching the features of data objects, the previous operator can achieve a certain data processing by obtaining the features of the cached data objects, and the subsequent operators can also obtain the features of the cached data objects to achieve another data processing. This ensures that multiple operators implementing different data processing methods can reuse data features and avoids multiple operators repeatedly executing the data feature extraction process.

[0017] In one possible implementation, the first operator is used to modify the target data object in the first data set based on the target features of the data object in the first data set to obtain a modified first data set. The modified first data set includes the target object modified by the first operator and data objects that do not need to be modified. The data objects that do not need to be modified are the data objects in the first data set other than the target data object.

[0018] After the first operator completes its processing of the first data set, the execution device obtains the modified target data object sent by the first operator. That is, the target data object is only a part of the data in the first data set, which also includes another part of data that does not need to be modified.

[0019] Then, the execution device obtains a third request message from the third operator, which is used to request the target features of the data objects in the modified first data set.

[0020] After determining and caching the target features of the modified target data object, the execution device determines the modified target data object in the modified first data set and determines the target features of the modified target data object.

[0021] Based on the target features of the cached, unmodified data object and the target features of the modified target data object, the execution device sends the target features of the target data object and the target features of the unmodified data object to the third operator.

[0022] In other words, if an operator modifies some data objects in a dataset, and subsequent operators still need to obtain the target features of the data objects in the dataset, the execution device can simply re-execute the feature extraction process for the modified data objects, and for the unmodified data objects, it does not need to re-execute the feature extraction process, but can reuse the features that have already been extracted.

[0023] In this scheme, during the collaborative data processing of multiple operators, by pre-extracting and caching the features of data objects, and only performing the feature extraction process on the modified data objects after the data objects are modified, it is possible for the previous operator to achieve a certain data processing by obtaining the features of the cached data objects, and subsequent operators to obtain the features of the cached data objects and the newly extracted data objects to achieve another data processing. This ensures that multiple operators implementing different data processing methods can reuse data features and avoids multiple operators repeatedly performing the data feature extraction process.

[0024] In one possible implementation, the modified target data object is determined from the modified first data set. The execution device then acquires a state record structure, which records the modification status of multiple operators on multiple data objects. Furthermore, the state record structure is updated after the modified target data object is acquired. That is, as soon as an operator sends the modified data object to the execution device, the execution device triggers an update to the state record structure. For example, for each data item in the multiple data objects, the state record structure records whether each of the multiple operators has modified the data.

[0025] Based on the state record structure, the execution device can determine that the data in the modified first data set that needs to be feature extracted is the modified target data object.

[0026] In this solution, by maintaining a state record structure, the execution device can clearly record which data has been modified by the operators. This allows for precise re-performing feature extraction on the modified data when other operators request data features in the future, avoiding the need to re-perform feature extraction on all data and effectively reducing data processing latency.

[0027] In one possible implementation, each data object in a set of data objects corresponds to a set of elements in a state record structure (where each set of elements includes multiple elements), and each element in the set of elements corresponds to one of multiple operators. The value of each element is used to indicate whether the data object has been modified by the operator corresponding to the element. For example, each element can take the value 0 or 1. When the value of an element is 0, it means that the data object corresponding to the element has not been modified by the operator; when the value of an element is 1, it means that the data object corresponding to the element has been modified by the operator.

[0028] In this scheme, the state record structure is implemented in the form of a bitmap, which can realize the modification state of the recorded data with the smallest possible data structure, reduce the storage space occupied by the state record structure, and improve the speed of finding the modification state of the data in the state record structure.

[0029] In one possible implementation, the execution device acquires a feature set that records at least one feature of each data object among a plurality of data objects and a version of each feature, wherein the version of each feature indicates version information of the data object corresponding to the feature, modified by a plurality of operators. That is, in addition to acquiring the state record structure, the execution device also acquires the feature set to determine the features of the data and the versions of the features.

[0030] Based on the state record structure and the version of the features recorded in the feature set, the data in the modified first data set that needs to be feature extracted is determined to be the modified target data object.

[0031] That is, if the state record structure indicates that the modified target data object has been modified by the first operator, and the features recorded in the feature set are features of the target data object that have not been modified by the first operator, the execution device determines that the data in the modified first data set that needs to be feature extracted is the modified target data object.

[0032] In this solution, by maintaining a feature set, the execution device can cache the features of data objects and clearly record the version of the data object corresponding to each feature. This allows for accurate re-extraction of features on modified data objects that have not yet had their features extracted when other operators request features in subsequent requests, avoiding re-extraction of features on all data objects and effectively reducing data processing latency.

[0033] In one possible implementation, in order to obtain the target features of the modified target data object, the execution device performs feature extraction on the modified target data object to obtain the target features of the modified target data object; or, the execution device modifies the target features of the target data object recorded in the feature set based on the method of modifying the target data object by the first operator to obtain the target features of the modified target data object.

[0034] In this solution, different methods are provided to determine the characteristics of the modified data, which diversifies the ways to determine data characteristics. This makes it easier for the execution device to select the optimal method to determine the data characteristics and improves the efficiency of data processing.

[0035] In one possible implementation, before determining the target features of the modified target data object, the execution device first obtains the relationship between the time cost of a first calculation method and the time cost of a second calculation method. The first calculation method involves performing feature extraction on the modified target data object, and the second calculation method involves modifying the features of the target data object recorded in the feature set. Then, based on the relationship between the time costs of the first and second calculation methods, the execution device determines the calculation method used to obtain the target features of the modified target data object from the first and second calculation methods.

[0036] In other words, for a modified target data object, the execution device pre-evaluates which calculation method would have a smaller time overhead to obtain the target features of the modified target data object, and then the execution device uses the calculation method with the smaller time overhead to obtain the target features of the modified target data object.

[0037] In this scheme, for the data modified by the operator, by evaluating the time cost of using different calculation methods to obtain the features of the modified data, the execution device can select the method with the least time cost to obtain the features of the modified data, thereby improving the efficiency of data processing.

[0038] In one possible implementation, at least one feature of each of the multiple data objects is obtained by performing feature extraction on each data object at a preset granularity; when the data object for which feature extraction is performed is text data, the preset granularity includes at least one of the following granularities: character, word, paragraph, and data ontology; or, when the data object for which feature extraction is performed is audio data, the preset granularity includes audio segments and / or data ontology; or, when the data object for which feature extraction is performed is image data, the preset granularity includes image blocks and / or data ontology; or, when the data object for which feature extraction is performed is video data, the preset granularity includes images and / or data ontology.

[0039] A second aspect of this application provides a data processing apparatus, comprising: an acquisition module for acquiring a plurality of data objects; a processing module for performing feature extraction on each of the plurality of data objects to obtain and cache at least one feature of each data object, wherein the at least one feature is a feature that is repeatedly used by the plurality of operators when processing the plurality of data objects; the acquisition module is further configured to acquire a first request message from a first operator among the plurality of operators, wherein the first request message is used to request the acquisition of a target feature of a data object in a first data set, wherein the first data set includes at least one data object among the plurality of data objects, and the target feature belongs to at least one feature; and a sending module for sending the target feature of the data object in the first data set to the first operator based on the cached at least one feature, wherein the first operator is used to remove or modify the data object in the first data set based on the target feature of the data object in the first data set.

[0040] In one possible implementation, the target feature is a feature that the first operator will repeatedly use when processing data, and / or the target feature is a feature that both the first and second operators will use when processing data; wherein, the multiple operators include the second operator.

[0041] In one possible implementation, a first operator is used to remove some data objects in a first data set based on target features of data objects in a first data set to obtain a second data set; the acquisition module is further used to acquire a second request message from a second operator, the second request message being used to request the acquisition of target features of data objects in the second data set, wherein the plurality of operators includes the second operator; the sending module is further used to send the target features of data objects in the second data set to the second operator based on at least one cached feature, the second operator being used to remove or modify data objects in the second data set based on the target features of data objects in the second data set.

[0042] In one possible implementation, a first operator modifies a target data object in a first data set based on the target features of the data objects in the first data set to obtain a modified first data set. The modified first data set includes the target object modified by the first operator and data objects that do not need to be modified. The data objects that do not need to be modified are data objects in the first data set other than the target data object. The acquisition module is further configured to acquire the modified target data object sent by the first operator. The acquisition module is further configured to acquire a third request message from a third operator. The third operator is among multiple operators, and the third request message is used to request the acquisition of the target features of the data objects in the modified first data set. The processing module is further configured to determine the modified target data object in the modified first data set and determine the target features of the modified target data object. The sending module is further configured to send the target features of the target data object and the target features of the data objects that do not need to be modified to the third operator based on the cached target features of the data objects that do not need to be modified and the determined target features of the modified target data object.

[0043] In one possible implementation, before the processing module determines the target features of the modified target data object, the acquisition module is further configured to acquire a state record structure, which records the modification states of multiple operators on multiple data objects; the processing module is further configured to determine the modified target data object in the modified first data set based on the state record structure.

[0044] In one possible implementation, each of the multiple data objects corresponds to a set of elements in a state record structure, each element in the set of elements corresponds to one of the multiple operators, and the value of each element is used to indicate whether the data object has been modified by the operator corresponding to the element.

[0045] In one possible implementation, the acquisition module is further configured to acquire a feature set, which records at least one feature of each data object among multiple data objects and the version of each feature, wherein the version of each feature is used to indicate the version information of the data object corresponding to the feature being modified by multiple operators; the processing module is further configured to determine the modified target data object in the modified first data set based on the state record structure and the version of the features recorded in the feature set.

[0046] In one possible implementation, the processing module is further configured to: modify the target features of the target data object recorded in the feature set based on the method of modifying the target data object by the first operator, so as to obtain the target features of the modified target data object.

[0047] In one possible implementation, at least one feature of each of the multiple data objects is obtained by performing feature extraction on each data object at a preset granularity; when the data object for which feature extraction is performed is text data, the preset granularity includes at least one of the following granularities: character, word, paragraph, and data ontology; or, when the data object for which feature extraction is performed is audio data, the preset granularity includes audio segments and / or data ontology; or, when the data object for which feature extraction is performed is image data, the preset granularity includes image blocks and / or data ontology; or, when the data object for which feature extraction is performed is video data, the preset granularity includes images and / or data ontology.

[0048] In one possible implementation, multiple data objects are applied to either of the following scenarios: model training or model inference.

[0049] Thirdly, a data processing apparatus is provided, comprising: a processor and a memory; the memory is used to store computer instructions, which, when executed by the processor, cause the data processing apparatus to perform the methods of any of the above aspects.

[0050] Fourthly, a computer-readable storage medium is provided that stores instructions which, when executed on a computer, cause the computer to perform the methods of any of the above aspects.

[0051] Fifthly, a computer program product containing instructions is provided, which, when executed on a computer, enable the computer to perform the methods described above.

[0052] In a sixth aspect, a chip system is provided, the chip system including a processor and a communication interface for communicating with a module other than the chip shown, the processor for running computer programs or instructions such that an apparatus on which the chip system is mounted can perform the methods of any of the above aspects.

[0053] In a seventh aspect, a computing device is provided, the computing device including a data processing apparatus of the third aspect or a chip system of the sixth aspect, wherein the data processing apparatus or the chip system in the computing device is used to implement the operational steps of the method of any of the above aspects.

[0054] Eighthly, a computing device cluster is provided, comprising at least one computing device, wherein any one computing device is used to run a computer program or instructions, such that the computing device cluster can perform the methods of any of the above aspects. Alternatively, some or all of the computing devices are used together to run a computer program or instructions, such that the computing device cluster can perform the methods of any of the above aspects.

[0055] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0056] Figure 1 A schematic diagram of a dataset processing flow provided in this application;

[0057] Figure 2 A schematic diagram of a system architecture provided for this application;

[0058] Figure 3 A flowchart illustrating a data processing method provided in this application;

[0059] Figure 4 A flowchart illustrating the collaborative data processing of a first operator and a second operator provided in this application;

[0060] Figure 5 A flowchart illustrating the collaborative data processing of a first operator and a third operator provided in this application;

[0061] Figure 6 A schematic diagram of a state record structure provided in this application;

[0062] Figure 7 A schematic diagram of a feature set provided for this application;

[0063] Figure 8 This application provides a schematic diagram of a system architecture for a model training and push scenario;

[0064] Figure 9 This application provides a schematic diagram of the data processing flow in a model training and push scenario;

[0065] Figure 10 A schematic diagram illustrating the interaction process between an operator and a feature caching engine provided in this application;

[0066] Figure 11A A schematic diagram illustrating the interaction between operator 1 and the feature caching engine provided in this application;

[0067] Figure 11B A schematic diagram illustrating the interaction between operator 2 and the feature caching engine provided in this application;

[0068] Figure 11C A schematic diagram illustrating the interaction between operator 3 and the feature caching engine provided in this application;

[0069] Figure 12 A schematic diagram of the structure of a data processing device provided in this application;

[0070] Figure 13A schematic diagram of the structure of a computing device provided in this application;

[0071] Figure 14 This application provides a schematic diagram of the structure of a computing device cluster;

[0072] Figure 15 A schematic diagram of another computing device cluster provided in this application;

[0073] Figure 16 This application provides a schematic diagram of the structure of a chip;

[0074] Figure 17 This is a schematic diagram of the structure of a computer-readable storage medium provided in this application. Detailed Implementation

[0075] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application are described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some, and not all, of the embodiments of this application. Those skilled in the art will recognize that, with the emergence of new application scenarios, the technical solutions provided by this application are also applicable to similar technical problems.

[0076] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such descriptions can be used interchangeably where appropriate to allow embodiments to be implemented in a sequence other than that illustrated or described in this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices. The naming or numbering of steps appearing in this application does not imply that the steps in the method flow must be performed in the chronological / logical order indicated by the naming or numbering. The execution order of named or numbered process steps can be changed according to the desired technical purpose, as long as the same or similar technical effect is achieved. The division of units in this application is a logical division. In practical applications, there may be other division methods. For example, multiple units may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the shown or discussed mutual coupling, direct coupling, or communication connection may be through some interface, and the indirect coupling or communication connection between units may be electrical or other similar forms, none of which are limited in this application. Furthermore, the units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed among multiple circuit units. Some or all of the units can be selected to achieve the purpose of the solution in this application according to actual needs.

[0077] For data processing in model training or inference scenarios, the large size of the datasets and the numerous processing steps result in significant time overhead and low processing efficiency.

[0078] The applicant's research revealed that related technologies typically employ multiple sequentially arranged operators to process the dataset in turn. For example, please refer to [link to relevant documentation]. Figure 1 , Figure 1 This is a schematic diagram illustrating the processing flow of a dataset provided in this application. Figure 1As shown, a dataset used for model training needs to go through stages such as general data cleaning, personalized cleaning, personalized annotation, and data filtering. The general data cleaning stage includes steps such as removing invisible characters, redundant spaces, emojis, and garbled text. The personalized cleaning stage includes steps such as removing or replacing sensitive words, removing or replacing URLs, and anonymizing identity information. The personalized annotation stage includes steps such as manual annotation and automatic model annotation. The data filtering stage includes steps such as filtering by word count, word repetition rate, keywords, semantic information, and annotation information. Generally speaking, Figure 1 Each step in each stage shown is typically executed by a corresponding operator; that is, different operators are combined to complete multiple steps in data processing.

[0079] However, in the process of processing datasets, in order to achieve the data processing objectives, different operators may often repeatedly perform some necessary basic steps. For example, in Figure 1 In the data filtering stage shown, when one operator performs word repetition rate filtering, it needs to perform word segmentation on the data once, and then remove text data with high word repetition rates based on the segmentation results; similarly, when another operator performs keyword filtering, it also needs to perform word segmentation on the data once, and then remove text data containing or not containing the specified keywords based on the segmentation results. That is, different operators perform word segmentation on the data separately during operation, and word segmentation is actually a time-consuming operation. If most operators repeatedly perform word segmentation on the data, it will result in extremely high time overhead.

[0080] Furthermore, for the same operator, some necessary basic steps may be repeatedly performed during data processing. For example, in Figure 1 In the data filtering stage shown, when a certain operator performs word count filtering, it first needs to perform word segmentation on the data, and then filter text data with word counts within a certain range based on the segmentation results. However, if the operator ultimately filters too much or too little text data, it means that the filtered text data does not meet the requirements. Therefore, users may often adjust the range value in the operator and re-execute the operator. In this way, when the operator with the adjusted range value is re-executed, the operator will perform word segmentation on the data again, and filter text data with word counts within the adjusted range based on the segmentation results. That is to say, in some scenarios, the same operator may repeatedly perform some basic steps to achieve the purpose of data processing.

[0081] Furthermore, most operators, when performing data processing, often rely on certain characteristic information of the data to complete operations such as filtering or modifying the data. For example, in Figure 1In the process, the operators in the personalized cleaning stage and the data filtering stage both need to rely on the word segmentation results of the data to modify or filter the data; the operators that perform word count filtering need to rely on the number of words in the data to filter the data.

[0082] In view of this, this application provides a data processing method for datasets that need to be processed by multiple operators. Feature extraction is performed on the data objects in the dataset beforehand, and the features of each data object are obtained and cached. The cached features are those that will be repeatedly used by multiple operators when processing the dataset. Thus, when any of the multiple operators needs to process the dataset based on the features of the data objects, the corresponding data object features can be sent to the operator, eliminating the need for each operator to independently perform feature extraction and avoiding repeated feature extraction of the dataset by multiple operators, thereby effectively improving data processing efficiency.

[0083] Please see Figure 2 , Figure 2 This is a schematic diagram of a system architecture provided for this application. (For example...) Figure 2 As shown, in this system architecture, the execution device 20 for performing the data processing method provided in this application can be implemented by a physical host (computing device) or multiple physical hosts (computing device cluster).

[0084] In addition, the system architecture includes a data storage system 21, which stores data that needs to be processed, such as multimedia data like text, audio, image, or video data. Specifically, the data stored in the data storage system 21 can be applied to model training, model inference, or data query scenarios.

[0085] Optionally, for persistent data storage, the data storage system 21 can be located outside the execution device 20, exchanging data with the execution device 20 via a network. Alternatively, if the execution device 20 is a physical host, the data storage system 21 can also be located inside the execution device 20, such as exchanging data with the processor via a bus. In this case, the data storage system 21 functions as a hard disk. With the data storage system 21, the execution device 20 can use the data in the data storage system 21, or call the program code in the data storage system to implement the data processing method provided in this application, thereby obtaining and caching the characteristics of the data stored in the data storage system 21.

[0086] Optionally, the execution device 20 may also run multiple operators for performing data culling or modification. These multiple operators need to obtain the characteristics of the data objects cached by the execution device 20, thereby enabling the culling or modification of data objects based on their characteristics.

[0087] Optionally, the execution device 20 may be connected to a data processing device 22. This data processing device 22 runs multiple operators for performing data culling or modification. These operators need to obtain the characteristics of the data cached by the execution device 20, thereby enabling data culling or modification based on these characteristics. The data processing device 22 may be implemented using a single physical host (computing device) or multiple physical hosts (computing device cluster).

[0088] Please see Figure 3 , Figure 3 This is a flowchart illustrating a data processing method provided in this application. Figure 3 As shown, the data processing method includes the following steps 301-304.

[0089] Step 301: Obtain multiple data objects.

[0090] In this application, the execution device first acquires multiple data objects that have been pre-collected and subsequently processed by multiple operators. One of these data objects can be multimedia data, such as text data, audio data, image data, or video data. Specifically, any one of the multiple data objects can be a data object in a specific data format. For example, a data object can be a TXT document, a DOC document, or a PDF document; or, a data object can be an audio file in Moving Picture Experts Group Audio Layer III (MP3) format; or, a data object can be an image in Joint Photographic Experts Group (JPEG) format or Portable Network Graphics (PNG) format; or, a data object can be a video file in MP4 format or an audio video interleaved (AVI) format video.

[0091] It should be noted that multiple data objects may all be of the same type, such as multiple data objects being all text data, or multiple data objects being all image data. Multiple data objects may also include multiple different types of data. For example, some data objects may be text data, while others may be audio data. Or, for another example, multiple data objects may include four parts: the first part consists entirely of text data, the second part consists entirely of audio data, the third part consists entirely of image data, and the fourth part consists entirely of video data. In general, this application does not limit the data type of each data object within the multiple data objects.

[0092] In this context, an operator (or multiple operators) refers to a computational unit that performs operations such as removing or modifying multiple data objects. In other words, an operator is a computational unit used to perform specific data processing operations; essentially, it is code used to execute a series of data processing logic.

[0093] Optionally, the multiple data objects acquired by the execution device can be applied to any of the following scenarios: model training, model inference, or data querying. For example, in a model training scenario, multiple data objects, after being processed by multiple operators, can serve as training data for the model. In a model inference scenario, multiple data objects, after being processed by multiple operators, can serve as inference data for the model. In a data querying scenario, multiple data objects, after being processed by multiple operators, can serve as queryable data stored in a data management platform for users to query and retrieve.

[0094] In summary, the aforementioned data objects are data collected in advance through various methods and do not meet the needs of actual applications. Therefore, multiple operators are needed to further process these data objects (e.g., remove or modify them) to obtain data that meets the requirements of actual applications. Removing multiple data objects can also be understood as filtering them.

[0095] Step 302: Perform feature extraction on each of the multiple data objects to obtain and cache at least one feature of each data object. The at least one feature is a feature that the multiple operators will reuse when processing the multiple data objects.

[0096] In this application, for each of multiple data objects, feature extraction can be performed once or multiple times at a preset granularity to obtain at least one feature for each data object. Furthermore, when performing multiple feature extractions on each data object, the method of feature extraction performed on each data object is different, resulting in multiple different features corresponding to each data object. For example, when a data object is text data, feature extraction is performed twice on the text data. Specifically, these two feature extraction operations involve word segmentation of the text data and calculation of the number of words included in the text data, thereby obtaining two features of the text data (i.e., the word segmentation result of the text data and the number of words included in the text data).

[0097] It should be noted that at least one feature obtained by performing feature extraction on each data object is a feature that is repeatedly used by multiple operators when processing multiple data objects. That is, in the overall process of multiple operators processing the aforementioned multiple data objects, at least one feature obtained by performing feature extraction on the data will be used at least twice or more. Therefore, obtaining at least one feature of a data object by performing feature extraction and caching at least one feature of the data object can prepare in advance for the subsequent data processing by multiple operators and avoid multiple operators repeatedly performing feature extraction. Caching at least one feature of a data object means storing at least one feature of the data object on a storage medium with high read / write speed, thereby improving the read / write efficiency of the feature. For example, if the data object itself is stored on a hard disk drive (HDD), at least one feature of the data object can be stored on a solid state drive (SSD) with higher read / write speed. Alternatively, at least one feature of the data object can be stored in memory.

[0098] It should be understood that each of the above-mentioned features will be reused by multiple operators. This means that the feature may be reused by one of the multiple operators or by at least two of the multiple operators respectively, so that each feature will be used twice or more in the overall process of multiple operators processing multiple data objects.

[0099] In this application, at least one feature of each of the multiple data objects is obtained by performing feature extraction on each of the multiple data objects at a preset granularity. Each feature obtained through feature extraction can be attribute information describing the data object at the preset granularity; that is, the extracted features are essentially descriptive information about the data object. The preset granularity can be a pre-specified feature extraction granularity based on the actual scenario, used to extract features that will be repeatedly used by multiple operators during data processing.

[0100] For example, when the data object for feature extraction is text data, the preset granularity includes at least one of the following granularities: character, word, paragraph, and data ontology. Here, data ontology refers to the text data itself.

[0101] For example, when the preset granularity includes character granularity, at least one feature of the obtained text data can specifically include features such as the number of characters included in the text data and the character repetition rate of the text data. When the preset granularity includes word granularity, at least one feature of the obtained text data can specifically include features such as the number of words included in the text data, the word repetition rate of the text data, or the word segmentation result of the text data. When the preset granularity includes paragraph granularity, at least one feature of the obtained text data can specifically include features such as the number of paragraphs included in the text data or the repetition of paragraphs in the text data. When the preset granularity includes data ontology granularity, at least one feature of the obtained text data can specifically include features such as the name of the text data, the modification time of the text data, the size of the text data, the semantic summary text of the text data, or the semantic vector of the text data. Here, the semantic summary text refers to the summary text obtained by semantically summarizing the specific content of the text data. The semantic vector of the text data refers to a vector obtained by extracting feature vectors from the text data semantically. Generally, the more similar the content of different text data is semantically, the more similar or even equal the semantic vectors of the text data will be.

[0102] Alternatively, when the data object for feature extraction is audio data, the preset granularity includes an audio segment (i.e., a small segment of audio in the audio data) and / or the data body (i.e., the audio data itself); or, when the data object for feature extraction is image data, the preset granularity includes an image patch (i.e., a small block in the image data) and / or the data body (i.e., the image data itself); or, when the data object for feature extraction is video data, the preset granularity includes an image (i.e., a frame in the video data) and / or the data body (i.e., the video data itself).

[0103] Step 303: Obtain a first request message from the first operator among multiple operators. The first request message is used to request the acquisition of the target feature of the data object in the first data set. The first data set includes at least one data object among multiple data objects, and the target feature belongs to at least one feature.

[0104] After caching at least one feature of each data object in a plurality of data objects, multiple operators begin executing the processing flow of the multiple data objects. Therefore, the execution device can obtain a first request message from the first operator. The first operator can be any one of the multiple operators, and the first request message sent by the first operator requests the acquisition of the target feature of each data object in the first data set. The target feature can be any one of the at least one of the aforementioned features, such as the word segmentation result of the data object, the number of words included in the data object, or the word repetition rate of the data object.

[0105] Optionally, each of the aforementioned data objects corresponds to a unique data index, the value of which is, for example, 0, 1, 2, etc. The first request message sent by the first operator may carry the data index of each data object in the first data set, thereby enabling the execution device to determine, based on the first request message, which data objects the first operator requests to acquire features from.

[0106] Alternatively, when multiple operators process multiple data objects sequentially, each operator can remove or modify multiple data objects, with the processed data object output by the previous operator serving as the input to the next operator. In this way, after any operator removes or modifies multiple data objects, the execution device obtains a new data set, which it treats as the input to the next operator. Therefore, when any operator sends a request message to the execution device, the execution device can interpret it as the operator requesting the characteristics of the data objects in the latest data set.

[0107] Optionally, the target feature is a feature that the first operator reuses when processing the data object, and / or the target feature is a feature that both the first and second operators use when processing the data object. The multiple operators include the second operator. That is, the first operator reuses the target feature of the data object when processing it; or, both the first and second operators use the target feature of the data object when processing it; or, the first operator reuses the target feature of the data object when processing it, and the second operator also uses the target feature of the data object when processing it.

[0108] In a possible example, suppose the target feature is the number of words contained in a data object, and the first operator is an operator that performs data culling based on the number of words contained in a data object. Then, the first operator will use the target feature multiple times when processing data objects in the first dataset. For example, the first operator might first cull data objects whose word count is not in the range of 50-100 based on the number of words contained in each data object in the first dataset; if it finds that there is too much data after culling, the first operator might then cull data objects whose word count is not in the range of 50-80 based on the number of words contained in each data object in the first dataset; if it finds that there is too little data, the first operator might then cull data objects whose word count is not in the range of 50-90 based on the number of words contained in each data object in the first dataset. That is, the first operator repeatedly culls data objects in the first dataset by repeatedly adjusting the range value used during data culling, and each data culling process requires the use of the target feature of the data object (i.e., the number of words contained in the data object).

[0109] In another possible example, suppose the target feature is the word segmentation result of the data object, the first operator is an operator to remove words containing politically sensitive terms, and the second operator is an operator to remove words containing violently sensitive terms. Then, the first operator will use the word segmentation result of the data object when processing the data object (i.e., detect whether the data object contains politically sensitive terms based on the word segmentation result of the data object), and the second operator will also use the word segmentation result of the data object when processing the data object (i.e., detect whether the data object contains violently sensitive terms based on the word segmentation result of the data object).

[0110] In this solution, for each data object, target features that may be reused by one operator or used by multiple operators during the processing are extracted in advance. This enables feature extraction to be performed only once on the data object, which can meet the feature usage requirements in the subsequent data object processing process. This effectively avoids the additional time overhead caused by multiple operators repeatedly performing feature extraction.

[0111] It should be noted that, when multiple operators are running on the same execution device, the data processing method provided in this application can be implemented by one or more processes on the execution device. That is, multiple operators interact with one or more processes responsible for executing the data processing method provided in this application to obtain the characteristics of the data object.

[0112] Step 304: Based on at least one cached feature, send the target feature of the data object in the first data set to the first operator. The first operator is used to remove or modify the data object in the first data set based on the target feature of the data object in the first data set.

[0113] Since the execution device caches at least one feature of each of multiple data objects, in response to a first request message sent by the first operator, the execution device can select a target feature of a data object from the cached features and send the selected target feature of the data object in the first data set to the first operator. In this way, after receiving the target feature of the data object in the first data set, the first operator can remove or modify the data object in the first data set based on the target feature, thereby achieving data processing.

[0114] It should be noted that when the first operator needs to adjust the parameters during data processing (such as the range of word counts described in the example above) to repeatedly perform data processing, the first operator can send a request message each time it performs data processing to request the target features of the data objects in the first data set, thereby avoiding the first operator repeatedly performing the feature extraction process of the data.

[0115] The above describes the process of extracting and caching the features of a data object, and then responding to a request message from an operator by returning the corresponding features of the data object to that operator. In most scenarios, multiple operators responsible for processing multiple data objects often process the data sequentially in a fixed order; that is, each subsequent operator often continues to process the data object processed by the previous operator. For ease of understanding, the following will describe the process of multiple operators collaboratively implementing data processing.

[0116] In one possible implementation, among the multiple operators mentioned above, the data object processed by the first operator is further processed by the second operator, and the first operator removes data objects from the first data set.

[0117] For example, after the first operator completes the processing of the first data set, the execution device can obtain a second request message from the second operator. This second request message requests the acquisition of target features of data objects in the second data set. The second data set is obtained by the first operator after removing data objects from the first data set; that is, the second data set includes some or all of the data objects from the first data set. In other words, after removing data objects from the first data set, the first operator obtains the second data set, and the first operator transmits the second data set to the second operator so that the second operator can continue processing the data objects in the second data set.

[0118] Thus, based on at least one feature of each cached data object, the execution device can send the target features of the data objects in the second data set to the second operator, so that the second operator can remove or modify the data objects in the second data set based on the target features of the data objects in the second data set.

[0119] It is understandable that, since the second data set is obtained by removing data objects from the first data set, the second data set must be a subset of the first data set. Therefore, the target features of the data objects in the first data set can actually be reused; that is, the target features of data in the first data set that also belong to the second data set can be used by both the first and second operators.

[0120] Please see Figure 4 , Figure 4 This application provides a schematic diagram of a data processing flow involving a first operator and a second operator working together. Figure 4 As shown, taking the example where the first and second operators do not run on the execution device, the target feature of the data object is the word segmentation result of the data object. The first operator is an operator that removes words containing politically sensitive terms, and the second operator is an operator that removes words containing violently sensitive terms. Assume that the first data set includes 100 data objects (e.g., ...). Figure 4 The first operator obtains the segmentation results of 100 data objects (data objects 1-100) from the execution device and uses these segmentation results to detect data objects containing politically sensitive words. The first operator will detect 10 data objects containing politically sensitive words (e.g., data objects 1-100). Figure 4 After removing data objects 91-100 from the first data set, a second data set including data objects 1-90 is obtained. Then, the first operator transmits the second data set obtained from the removal to the second operator. The second operator continues to obtain the word segmentation results of data objects 1-90 in the second data set from the execution device, and detects data objects containing violent sensitive words based on the word segmentation results of data objects 1-90, and removes the detected data objects containing violent sensitive words.

[0121] Clearly, by pre-performing feature extraction and caching the features of the extracted data objects using an execution device, the feature extraction process only needs to be performed once for each data object. For example, in Figure 4 In the example shown, the execution device performed word segmentation on only 100 data objects, that is, it performed word segmentation 100 times. In contrast, in related technologies, the first operator needs to perform word segmentation on 100 data objects, and the second operator also needs to perform word segmentation on 90 data objects, resulting in a total of 190 word segmentation operations, which leads to excessive time overhead.

[0122] In this scheme, during the collaborative data processing of multiple operators, by pre-extracting and caching the features of data objects, the previous operator can obtain the features of the cached data objects to perform a certain data processing, and the subsequent operators can also obtain the features of the cached data to perform another data processing. This ensures that multiple operators implementing different data processing methods can reuse data features and avoids multiple operators repeatedly executing the data feature extraction process.

[0123] In another possible implementation, among the multiple operators mentioned above, the data object processed by the first operator is further processed by the third operator, and the first operator modifies the data object in the first data set.

[0124] For example, after the first operator completes its processing of the first data set, the execution device obtains the modified target data object sent by the first operator. The modified target data object is obtained by the first operator modifying the target data object. The first data set includes the target data object and data that does not need modification. That is, the process of the first operator processing the data objects in the first data set involves modifying the target data object in the first data set, thereby obtaining the modified target data object. Furthermore, the target data object is only a part of the data objects in the first data set, which also includes another part of data objects that do not need modification. After receiving the modified target data object, the execution device can replace the original target data object with the modified target data object, or the execution device can store the modified target data object in other storage space and mark the modified target data object as obtained by modifying the original target data object.

[0125] Then, the execution device receives a third request message from the third operator, which requests the acquisition of the target features of the data objects in the modified first data set. The modified first data set includes the modified target data objects and data that does not need modification.

[0126] Secondly, the execution device determines the target features of the modified target data object and sends the target features of the target data object and the target features of the data objects that do not need modification to the third operator. Since the target data objects in the first data set have been modified, and the execution device initially extracted the target features of the target data objects, the execution device needs to re-execute the feature extraction process on the modified target data objects after receiving the third request message to obtain the target features of the modified target data objects. Furthermore, since the first data set also includes data objects that do not need modification, and these data objects have not been modified by the first operator, their target features can be directly reused without re-executing feature extraction.

[0127] In general, if an operator modifies some data objects in a dataset, and subsequent operators need to obtain the target features of the data objects in the dataset, the execution device can simply re-execute the feature extraction process for the modified data objects, and for the unmodified data objects, it does not need to re-execute the feature extraction process, but can reuse the features that have already been extracted.

[0128] Please see Figure 5 , Figure 5 This application provides a schematic diagram of a data processing flow involving a first operator and a third operator. Figure 5 As shown, taking the example where the first and second operators do not run on the execution device, the target feature of the data is the word segmentation result of the data. The first operator is an operator that performs politically sensitive word replacement, and the second operator is an operator that performs violent sensitive word replacement. Assume that the first data set includes 100 data objects (such as...). Figure 5 In the data objects (1-100), the first operator obtains the segmentation results of 100 data objects from the execution device and uses these segmentation results to detect data objects containing politically sensitive words. The first operator then analyzes 10 data objects containing politically sensitive words (e.g., ...). Figure 5 After modifying data objects 91-100 (e.g., replacing politically sensitive words in data objects 91-100 with specific words), data objects 91'-100' (corresponding to the target data objects mentioned above) are obtained, thus obtaining the modified first data set (i.e., data objects 1-90 and data objects 91'-100'). Then, the first operator transmits the modified first data set to the second operator and sends data objects 91'-100' to the execution device.

[0129] Secondly, the second operator sends a request to the execution device to obtain the word segmentation results of all data objects in the modified first data set. At this point, the execution device can determine that data objects 91'-100' in the modified first data set are modified data objects, while data objects 1-90 are unmodified data objects. Therefore, the execution device re-performs word segmentation on data objects 91'-100', thus obtaining the word segmentation results for data objects 91'-100'. Finally, the execution device returns the word segmentation results of data objects 1-90 and data objects 91'-100' to the second operator. Based on the word segmentation results of data objects 1-90 and data objects 91'-100', the second operator detects data objects containing violent sensitive words and replaces the detected violent sensitive words in the data objects with specific words.

[0130] Clearly, when the feature extraction of data objects is pre-executed by the execution device and the extracted features are cached, if the data objects are modified, the execution device only needs to re-execute the feature extraction process on the modified data objects, rather than re-executing the feature extraction process on all data objects. For example, in Figure 5 In the example shown, the execution device first performs word segmentation on 100 data objects, and then performs word segmentation on 10 more data objects, for a total of 110 word segmentation operations. Conversely, in related technologies, the first operator needs to perform word segmentation on 100 data objects in the first data set, and the second operator needs to perform word segmentation on the 100 data objects in the modified first data set transmitted from the first operator, resulting in a total of 200 word segmentation operations and thus excessive time overhead.

[0131] In this scheme, during the collaborative data processing of multiple operators, by pre-extracting and caching the features of data objects, and only performing the feature extraction process on the modified data objects after the data objects are modified, it is possible for the previous operator to achieve a certain data processing by obtaining the features of the cached data objects, and subsequent operators to obtain the features of the cached data objects and the newly extracted data objects to achieve another data processing. This ensures that multiple operators implementing different data processing methods can reuse data features and avoids multiple operators repeatedly performing the data feature extraction process.

[0132] Understandably, since the third request message received by the execution device requests the extraction of target features from data objects in the modified first data set, and the modified first data set includes both modified target data objects and data objects that do not require modification, the execution device needs to determine, upon receiving the third request message, which data objects in the modified first data set have been modified and which have not. This determines whether feature extraction should be re-executed for the modified data objects, while the pre-extracted features can be used for the unmodified data objects.

[0133] Based on this, in this application, the execution device can maintain a state record structure to record the modification status of each data in multiple data objects, so as to confirm whether each data object has been modified by the operator.

[0134] For example, after the execution device receives the third request message, it acquires a state record structure. This state record structure may be pre-installed in the execution device to record the modification status of multiple data objects by multiple operators. For instance, for each data object, the state record structure records whether each of the multiple operators has modified the data object. Furthermore, the state record structure is updated after acquiring the modified target data object sent by the first operator. That is, the execution device updates the state record structure each time it acquires the modified data object from an operator. Therefore, the state record structure records that the target data object has been modified by the first operator. In other words, the execution device updates the state record structure each time it acquires modified data from an operator, thereby recording which data has been modified by the operator.

[0135] Based on the state record structure, the execution device can determine that the data in the modified first data set requiring feature extraction is the modified target data object, thereby further determining the target features of the modified target data object. Furthermore, based on the state record structure, the execution device can determine that data in the modified first data set that does not require modification has not actually been modified by the first operator; therefore, the execution device does not need to re-perform feature extraction on the aforementioned data that does not require modification.

[0136] In this solution, by maintaining a state record structure, the execution device can clearly record which data objects have been modified by the operators. This allows for precise re-extraction of features on the modified data objects when other operators request features of the data objects in the future, avoiding the need to re-extract features from all data and effectively reducing data processing latency.

[0137] Optionally, the state record structure can be implemented using a bitmap, which is a compact data structure used to represent the state of elements in a set. Specifically, in the state record structure, each of the multiple data objects corresponds to multiple elements, and these elements correspond to multiple operators. The value of each element indicates whether the data object has been modified by the operator corresponding to the element. For example, each element can take the value 0 or 1. When the value of an element is 0, it means that the data object corresponding to the element has not been modified by the operator; when the value of an element is 1, it means that the data object corresponding to the element has been modified by the operator.

[0138] For example, please refer to Figure 6 , Figure 6 This is a schematic diagram of a state record structure provided in this application. Figure 6 As shown, assuming the execution device acquires N data objects, the state record structure includes N rows of elements, with each row corresponding to one of the data objects. Furthermore, assuming the operators processing the N data objects include Operator 1, the state record structure includes 5 columns of elements, with each column corresponding to an operator. Thus, based on the row and column of an element, the corresponding data object and operator can be determined. For example, a value of 1 in the first row and first column indicates that the first data object out of the N data objects has been modified by Operator 1; a value of 1 in the first row and second column indicates that the first data object out of the N data objects has been modified by Operator 2; and a value of 0 in the second row and second column indicates that the second data object out of the N data objects has not been modified by Operator 2.

[0139] It should be noted that, in order to improve the query efficiency of the state record structure, after any one of the multiple operators removes some data objects from multiple data objects, the execution device can delete the elements corresponding to the removed data objects from the state record structure, thereby reducing the size of the state record structure and making it easier to represent all the data objects that still need to be processed using the state record structure. For example, in Figure 6 In the process, if the Nth data object is removed by operator 4, the Nth row of data can be deleted from the state record structure, thereby reducing the size of the state record structure and making it easier to use the state record structure to represent the data objects that operator 5 needs to process as data object 1 to data object N-1.

[0140] In this scheme, the state record structure is implemented in the form of a bitmap, which can realize the modification state of the recorded data with the smallest possible data structure, reduce the storage space occupied by the state record structure, and improve the speed of finding the modification state of the data in the state record structure.

[0141] Of course, the state record structure can be implemented in other forms besides bitmaps, such as tables. This application does not make any specific limitation on this.

[0142] Optionally, to facilitate confirmation of which data version the features of the cached data were extracted from, the execution device may also maintain a feature set, which can record the features corresponding to each data and which version of the data each feature was extracted from.

[0143] For example, after the execution device receives the third request message, it can also acquire a feature set. This feature set records the characteristics of each data object among multiple data objects and the version of each characteristic. The version of each characteristic indicates the modification status of the data object corresponding to the characteristic (i.e., the version information of the data object modified by multiple operators). Therefore, based on the version of the characteristic, it is possible to determine which version of the data object the current feature set was extracted from, thus determining whether the current characteristic was extracted based on the latest version of the data object. In other words, in addition to acquiring the state record structure, the execution device also acquires a feature set to determine the characteristics of the data objects and their versions.

[0144] Thus, when the state record structure indicates that the modified target data object has been modified by the first operator, and the features recorded in the feature set are features of the target data object that have not been modified by the first operator, the execution device can determine that the data object requiring feature extraction in the modified first data set is the modified target data object. In other words, based on the state record structure, the execution device can determine which data objects corresponding to the features requested by the operator have been modified; based on the feature set, the execution device can determine based on which version of the data object its cached features were extracted. Therefore, by combining the state record structure and the feature set, the execution device can accurately determine which features need to be re-extracted.

[0145] Specifically, multiple data objects acquired by the execution device can constitute a dataset. When any one or more data objects in the dataset are modified by an operator, the version of all data objects in the dataset will change. However, if an operator does not modify any data object in the dataset, the version of the data objects in the dataset will not change.

[0146] In this solution, by maintaining a feature set, the execution device can cache the features of data objects and clearly record the version of the data object corresponding to each feature. This allows for precise re-extraction of features on modified data objects that have not yet had their features extracted when other operators request features from the data objects in the future. This avoids re-extracting features from all data objects and effectively reduces the latency of data processing.

[0147] For example, please refer to Figure 7 , Figure 7 This is a schematic diagram of a feature set provided for this application. (For example...) Figure 7 As shown, the feature set can record the path, features, and feature version number corresponding to each data object. The features of a data object refer to the features obtained after performing feature extraction on the data object, such as word repetition rate, presence of sensitive words, and the number of words contained in the data object. The feature version number refers to the version of the data corresponding to the currently recorded feature, i.e., which version of data the feature was extracted from.

[0148] For example, in Figure 7 In the data, the word repetition rate of data object 1 is X1, and X1 is extracted based on data object 1 with version number 0. The number of words contained in data object 1 is Y1, and Y1 is extracted based on data object 1 with version number 1. The number of words contained in data object 2 is Y2, and Y2 is extracted based on data object 2 with version number 0. Feature 2 of data 3 is that there are no sensitive words, and feature 2 is extracted based on data object 3 with version number 0.

[0149] The above describes the process by which an execution device needs to re-determine the characteristics of a modified data object after determining that the data object has been modified. When re-determining the characteristics of the modified data object, the execution device can obtain the characteristics of the modified data object through different methods.

[0150] Taking the execution device described in the above embodiments for determining the target features of the modified target data object as an example, the execution device can obtain the target features of the modified target data object in the following two ways.

[0151] In one possible implementation, the execution device directly re-extracts features from the modified target data object to obtain the target features of the modified target data object. For example, assuming the target features are word segmentation results, the execution device could re-segment the modified target data object to obtain the word segmentation results of the modified target data object.

[0152] In another possible implementation, based on the modification method performed on the target data object by the first operator, the features of the target data object recorded in the feature set are modified to obtain the target features of the modified target data object. In other words, the execution device modifies the original features based on the data modification method recorded in the feature set, thereby obtaining the updated features. For example, assuming the first operator performs politically sensitive word removal on the target data object, the execution device can perform politically sensitive word removal on the word segmentation results of the target data object recorded in the feature set, thereby obtaining the modified target features of the target data object (i.e., the word segmentation results of the target data object after removing politically sensitive words).

[0153] In this solution, different methods are provided to determine the characteristics of the modified data, which diversifies the ways to determine data characteristics. This makes it easier for the execution device to select the optimal method to determine the data characteristics and improves the efficiency of data processing.

[0154] Optionally, after determining that feature extraction needs to be performed on the modified target data object, the execution device may first obtain the relationship between the time cost of the first calculation method and the time cost of the second calculation method, wherein the first calculation method is to perform feature extraction on the modified target data object, and the second calculation method is to modify the features of the target data object recorded in the feature set.

[0155] Then, based on the relationship between the time overhead of the first calculation method and the time overhead of the second calculation method, the execution device determines the calculation method used to obtain the target features of the modified target data object in the first calculation method and the second calculation method, that is, determines which calculation method to use to obtain the target features of the modified target data object.

[0156] For example, if the time cost of the first calculation method is less than that of the second calculation method, the execution device uses the first calculation method to obtain the target features of the modified target data object; if the time cost of the first calculation method is greater than that of the second calculation method, the execution device uses the second calculation method to obtain the target features of the modified target data object. If the time cost of the first calculation method is equal to that of the second calculation method, the execution device can randomly select one of the first and second calculation methods to obtain the target features of the modified target data object.

[0157] In other words, for a modified target data object, the execution device pre-evaluates which calculation method would have a smaller time overhead to obtain the target features of the modified target data object, and then the execution device uses the calculation method with the smaller time overhead to obtain the target features of the modified target data object.

[0158] Understandably, since the time required to perform a certain processing operation on a fixed amount of data is usually fixed and can be pre-calculated, in practical applications, the execution device can assess the time cost of performing feature extraction on the modified data based on the required feature extraction operation and the size of the modified data, thus obtaining the time cost of the first calculation method described above. Similarly, the execution device can also assess the time cost of processing the data features based on the type of operation performed on the data features and the size of the data features, thus obtaining the time cost of the second calculation method described above.

[0159] In this scheme, for the data object modified by the operator, by evaluating the time cost of using different calculation methods to obtain the features of the modified data object, the execution device can select the method with the least time cost to obtain the features of the modified data object, thereby improving the efficiency of data processing.

[0160] The execution process of the data processing method provided in this application has been described above. For ease of understanding, the execution process of this data processing method in practical application scenarios will be detailed below with specific examples.

[0161] Please see Figure 8 , Figure 8 This is a schematic diagram of a system architecture for a model training and push scenario provided in this application. For example... Figure 8 As shown, the system architecture in model training or inference scenarios includes operators for performing data processing tasks (i.e., the multiple operators described above), a feature caching engine, and a data storage system for storing the dataset. The feature caching engine executes the data processing method provided in this application, thereby providing the operators with the features of the corresponding data objects. The data storage system processes the dataset that needs to be processed by the operators, as well as the data objects modified by the operators. In practical applications, the operators and the feature caching engine can be deployed on the same execution device or on different execution devices. The data storage system can be deployed on the execution device where the feature caching engine runs; for example, the data storage system can be implemented using the hard disk and memory on the execution device. Alternatively, the data storage system can be deployed outside the execution device where the feature caching engine runs; for example, the data storage system can interact with the execution device via a network.

[0162] Please see Figure 9 , Figure 9 This is a schematic diagram of the data processing flow in a model training and inference scenario provided in this application. For example... Figure 9 As shown, assume that the model training and inference scenario includes M operators for performing data processing tasks (such as...). Figure 9 The data objects in the dataset are processed sequentially by operators 1 through M, meaning that the data object processed by the previous operator becomes the input of the next operator. During the processing of each data object, the operator can send a request message to the feature caching engine to request the features of the data object, thereby enabling the operator to perform processing operations such as removing or modifying the data object based on the obtained features.

[0163] Furthermore, if the operator performs culling or modification on a data object, the operator will feed back the culled data object to the feature cache engine, as well as the modified data object, so that the feature cache engine can know the specific situation of the data object being processed by the current operator in a timely manner.

[0164] After the preceding operators modify the data objects in the dataset, and subsequent operators request the features of the modified data objects from the feature caching engine, the feature caching engine will trigger the updating of the data object's features, thereby returning the modified data object's features to the operators and ensuring the accuracy of the feature feedback.

[0165] Please see Figure 10 , Figure 10 This is a schematic diagram illustrating the interaction process between an operator and a feature caching engine provided in this application. Figure 10 As shown, the interaction process between the operator and the feature caching engine includes the following steps 1001-1008.

[0166] Step 1001: The feature caching engine obtains the request message sent by the operator, which indicates the data index, feature type, and the version of the data object corresponding to the feature.

[0167] During the data processing performed by the operator, the feature caching engine can obtain the request message sent by the operator. This request message can carry the data index corresponding to the data object on which the operator requests to obtain the feature, the type of feature requested by the operator (such as word repetition rate, whether it contains sensitive words, or the number of words contained in the data object), and the version of the data object corresponding to the feature (i.e., the version of the data object on which the feature needs to be extracted).

[0168] Step 1002: The feature caching engine looks up the status record structure and feature set based on the request message.

[0169] Specifically, based on the request message sent by the operator, the feature caching engine can search the state record structure and feature set to confirm whether the features of the data object required by the operator can be found in the feature set.

[0170] Step 1003: If a feature that does not match the version is found, the feature caching engine evaluates the time cost C0 of extracting features based on the new version data object and the time cost C2 of updating features based on the features recorded in the feature set.

[0171] If the feature caching engine can find the feature requested by the operator in the feature set, but the version of the data object of the feature recorded in the feature set does not match the version of the data object of the feature requested by the operator, then it means that the feature caching engine has found a feature with a mismatched version. For example, for data object 1, the data object version of the feature recorded in the feature set is version 0, while the data object version of the feature requested by the operator is version 1, and data object 1 was modified when it changed from version 0 to version 1, then the feature caching engine can determine that it has found a feature with a mismatched version for data object 1 in the feature set.

[0172] When a feature mismatch is found, the feature caching engine needs to update the features of the data object in the feature set. Therefore, the feature caching engine can first evaluate the time cost C0 of extracting features based on the new version of the data object, and the time cost C2 of updating features based on the features recorded in the feature set. Extracting features based on the new version of the data object means performing feature extraction based on the data object under the data object version specified by the operator (i.e., the new data object version), obtaining the features of the data object under the new data object version. Updating features based on the features recorded in the feature set means updating the features based on the features already recorded in the feature set, thereby obtaining the features of the data object under the new data object version.

[0173] Step 1004: The feature caching engine determines whether the time cost C0 is less than the time cost C2.

[0174] Step 1005: If the time cost C0 is less than the time cost C2, the feature caching engine extracts features based on the new version of the data object to obtain the updated features.

[0175] For example, for data object 1, the data object version of the features recorded in the feature set is version 0, while the data object version of the features requested by the operator is version 1. The feature caching engine can perform feature extraction on data object 1 of version 1 to obtain the updated features.

[0176] Step 1006: If the time cost C0 is not less than the time cost C2, the feature caching engine traverses the state record structure, obtains the operations that the data object has undergone in the version change, and performs the corresponding operations on the features recorded in the feature set to obtain the updated features.

[0177] For example, for data object 1, the data object version of the features recorded in the feature set is version 0, while the data object version of the features requested by the operator is version 1, and the type of the features requested by the operator is word segmentation result. The feature caching engine traverses the state record structure and determines that the change of data object 1 from version 0 to version 1 is due to the sensitive word replacement operation performed by the sensitive word replacement operator. Therefore, for the word segmentation result corresponding to version 0 of data object 1 recorded in the feature set, the feature caching engine can perform a sensitive word replacement operation on the word segmentation result to obtain the word segmentation result corresponding to version 1 of data object 1.

[0178] Step 1007: The feature caching engine returns the found features to the operator.

[0179] After the feature caching engine completes the above steps 1005 or 1006 and obtains the updated features, the feature caching engine can return the updated features as the found features to the operator.

[0180] In addition, when the feature caching engine performs step 1002 as described above and determines that a feature matching the version is found in the feature set, the feature caching engine can return the found feature to the algorithm.

[0181] Step 1008: The feature caching engine reports to the operator that it cannot find the feature, triggering the operator to extract the feature itself.

[0182] When the feature caching engine performs step 1002 above and cannot find the feature requested by the operator in the feature set, it means that the feature caching engine has not pre-extracted the feature of the data object. The feature caching engine reports to the operator that it cannot find the feature, triggering the operator to extract the feature itself.

[0183] For example, please refer to Figure 11A-11C , Figure 11A A schematic diagram illustrating the interaction between operator 1 and the feature caching engine provided in this application; Figure 11B A schematic diagram illustrating the interaction between operator 2 and the feature caching engine provided in this application; Figure 11C This is a schematic diagram illustrating the interaction between operator 3 and the feature caching engine provided in this application. Operators 1-3 are three of a plurality of operators used to process the dataset, and operators 1-3 are executed sequentially.

[0184] like Figure 11AAs shown, operator 1 is used to perform word repetition rate filtering; that is, operator 1 is used to remove data objects that do not meet preset requirements based on word repetition rate. When processing data objects 1-3, operator 1 sends request message 1 to the feature query engine to request feature 1 (i.e., word repetition rate) of data objects 1-3 in version 0. The feature query engine queries the feature set and determines that the feature set records the feature 1 corresponding to data objects 1-3 in version 0. Therefore, the feature query engine returns the feature 1 corresponding to data objects 1-3 in version 0 to operator 1.

[0185] After the feature query engine returns feature 1 corresponding to data objects 1-3, operator 1 processes data objects 1-3 based on the returned feature, confirming that all data objects 1-3 meet the requirements, and therefore does not remove data objects 1-3. Furthermore, since operator 1 does not modify the data objects in the data object set, the version numbers of data objects 1-3 remain unchanged at version 0.

[0186] like Figure 11B As shown, operator 2 is used to perform sensitive word replacement; that is, operator 2 is used to replace sensitive words in data objects containing sensitive words. When processing data objects 1-3, operator 2 sends request message 2 to the feature query engine to request feature 2 (i.e., whether the data objects contain sensitive words) of data objects 1-3 in version 0. The feature query engine queries the feature set and determines that the feature set records the feature 2 corresponding to data objects 1-3 in version 0. Therefore, the feature query engine returns the feature 2 corresponding to data objects 1-3 in version 0 to operator 2.

[0187] After the feature query engine returns feature 2 corresponding to data objects 1-3 to operator 2, operator 2 can determine that data object 1 contains sensitive words. Therefore, it modifies data object 1 to replace the sensitive words. Operator 2 then returns the modified data object 1 to the feature cache engine. At this point, the feature query engine updates its state record structure, recording that data object 1 has been modified by operator 2. Because data object 1 in the data object set has been modified, the versions of all data objects in the set change; that is, the versions of data objects 1-3 change from version 0 to version 1. However, it is important to note that compared to version 0, only version 1 data object 1 has been modified; versions 2 and 3 have not actually been modified. The feature query engine also updates the feature set synchronously, changing the path of data object 1 from path 1 to path 1'.

[0188] like Figure 11CAs shown, operator 3 is used to perform word count filtering, that is, operator 3 is used to remove data objects that do not meet the preset requirements based on the number of words contained in the data object. When processing data object 1-data object 3, operator 3 sends request message 3 to the feature query engine to request feature 3 (i.e., word count) of data object 1-data object 3 in version 1. The feature query engine queries the feature set and determines that the feature set records the feature 3 corresponding to data object 1-data object 3 under version 0. Furthermore, by querying the status record structure, the feature query engine can determine that when changing from version 0 to version 1, only data object 1 has been modified, while data object 2 and data object 3 have not been modified. Therefore, the feature query engine redetermines the feature 3 of data object 1 in version 1, thereby obtaining the new feature 3 (i.e., word count Y1') corresponding to data object 1. In this way, the feature query engine can return the new feature 3 corresponding to data object 1, as well as the feature 3 corresponding to data object 2 and data object 3 originally recorded in the feature set, to operator 3. In addition, the feature query engine can also update the feature set, thereby updating the feature 3 corresponding to data object 1 to the word count Y1', and the version number corresponding to feature 3 is 1.

[0189] The method provided in this application has been described in detail above. Next, the device provided in this application for performing the above method will be described.

[0190] Please see Figure 12 , Figure 12 This is a schematic diagram of the structure of a data processing device provided in this application. Figure 12 As shown, the data processing apparatus includes: an acquisition module 1201 for acquiring multiple data objects; a processing module 1202 for performing feature extraction on each of the multiple data objects to obtain and cache at least one feature of each data object, wherein the at least one feature is a feature that the multiple operators will reuse when processing the multiple data objects; the acquisition module 1201 is further configured to acquire a first request message from a first operator among the multiple operators, wherein the first request message is used to request the acquisition of a target feature of a data object in a first data set, wherein the first data set includes at least one data object among the multiple data objects, and the target feature belongs to at least one feature; and a sending module 1203 for sending the target feature of the data object in the first data set to the first operator based on the cached at least one feature, wherein the first operator is used to remove or modify the data object in the first data set based on the target feature of the data object in the first data set.

[0191] In one possible implementation, the target feature is a feature that the first operator will repeatedly use when processing data, and / or the target feature is a feature that both the first and second operators will use when processing data; wherein, the multiple operators include the second operator.

[0192] In one possible implementation, the first operator is used to remove some data objects in the first data set based on the target features of the data objects in the first data set to obtain a second data set; the acquisition module 1201 is further used to acquire a second request message from the second operator, the second request message being used to request the acquisition of the target features of the data objects in the second data set, wherein the plurality of operators includes the second operator; the sending module 1203 is further used to send the target features of the data objects in the second data set to the second operator based on at least one cached feature, the second operator being used to remove or modify the data objects in the second data set based on the target features of the data objects in the second data set.

[0193] In one possible implementation, a first operator modifies a target data object in a first data set based on the target features of the data objects in the first data set to obtain a modified first data set. The modified first data set includes the target object modified by the first operator and data objects that do not need to be modified. The data objects that do not need to be modified are data objects in the first data set other than the target data object. The acquisition module 1201 is further configured to acquire the modified target data object sent by the first operator. The acquisition module 1201 is also configured to acquire a third request message from a third operator. The third operator is among multiple operators. The third request message is used to request the acquisition of the target features of the data objects in the modified first data set. The processing module 1202 is further configured to determine the modified target data object in the modified first data set and determine the target features of the modified target data object. The sending module 1203 is further configured to send the target features of the target data object and the target features of the data objects that do not need to be modified to the third operator based on the cached target features of the data objects that do not need to be modified and the target features of the modified target data object that has been determined.

[0194] In one possible implementation, before the processing module 1202 determines the target features of the modified target data object, the acquisition module 1201 is further used to acquire a state record structure, which is used to record the modification state of multiple operators on multiple data objects; the processing module 1202 is further used to determine the modified target data object in the modified first data set based on the state record structure.

[0195] In one possible implementation, each of the multiple data objects corresponds to a set of elements in a state record structure, each element in the set of elements corresponds to one of the multiple operators, and the value of each element is used to indicate whether the data object has been modified by the operator corresponding to the element.

[0196] In one possible implementation, the acquisition module 1201 is further configured to acquire a feature set, which records at least one feature of each data object among multiple data objects and the version of each feature, wherein the version of each feature is used to indicate the version information of the data object corresponding to the feature being modified by multiple operators; the processing module 1202 is further configured to determine the modified target data object in the modified first data set based on the state record structure and the version of the features recorded in the feature set.

[0197] In one possible implementation, the processing module 1202 is further configured to: modify the target features of the target data object recorded in the feature set based on the method of modifying the target data object by the first operator, so as to obtain the target features of the modified target data object.

[0198] In one possible implementation, at least one feature of each of the multiple data objects is obtained by performing feature extraction on each data object at a preset granularity; when the data object for which feature extraction is performed is text data, the preset granularity includes at least one of the following granularities: character, word, paragraph, and data ontology; or, when the data object for which feature extraction is performed is audio data, the preset granularity includes audio segments and / or data ontology; or, when the data object for which feature extraction is performed is image data, the preset granularity includes image blocks and / or data ontology; or, when the data object for which feature extraction is performed is video data, the preset granularity includes images and / or data ontology.

[0199] In one possible implementation, multiple data objects are applied to either of the following scenarios: model training or model inference.

[0200] The acquisition module 1201, processing module 1202, and sending module 1203 can all be implemented in software or in hardware. For example, the implementation of processing module 1202 will be described below. Similarly, the implementation of acquisition module 1201 can be referenced to that of processing module 1202.

[0201] As an example of a software functional unit, processing module 1202 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, processing module 1202 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0202] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0203] As an example of a hardware functional unit, the processing module 1202 may include at least one computing device, such as a server. Alternatively, the processing module 1202 may be implemented using a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a neural network processing unit (NPU), a system-on-chip (SoC), an offload card, an accelerator card, or any combination thereof.

[0204] The processing module 1202 includes multiple computing devices that can be distributed in the same region or in different regions. Similarly, the processing module 1202 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the processing module 1202 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, GALs, DPUs, NPUs, SoCs, offloading cards, and accelerator cards.

[0205] Please see Figure 13 , Figure 13 A schematic diagram of the structure of a computing device provided in this application. Figure 13 The computing device 1300 shown can be used to execute the task processing method provided in this embodiment. For example... Figure 13 As shown, the computing device 1300 includes a bus 1302, a processor 1304, a memory 1306, and a communication interface 1308. The processor 1304, the memory 1306, and the communication interface 1308 communicate with each other via the bus 1302. The computing device 1300 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 1300.

[0206] Bus 1302 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 13 The bus 1302 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 1302 may include a path for transmitting information between various components of the computing device 1300 (e.g., memory 1306, processor 1304, communication interface 1308).

[0207] The processor 1304 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0208] The memory 1306 may include volatile memory, such as random access memory (RAM). The processor 1304 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0209] The memory 1306 stores executable program code, and the processor 1304 executes this executable program code to implement the functions of the aforementioned acquisition module and processing module, thereby realizing the model processing method described above. That is, the memory 1306 stores instructions for executing the model processing method.

[0210] The communication interface 1308 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 1300 and other devices or communication networks.

[0211] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0212] Please see Figure 14 , Figure 14 This is a schematic diagram of a computing device cluster provided in this application. Figure 14 As shown, the computing device cluster includes at least one computing device 1300. The memory 1306 of one or more computing devices 1300 in the computing device cluster may store the same instructions for executing task processing methods.

[0213] In some possible implementations, the memory 1306 of one or more computing devices 1300 in the computing device cluster may also store partial instructions for executing task processing methods. In other words, a combination of one or more computing devices 1300 can jointly execute instructions for executing task processing methods.

[0214] It should be noted that the memory 1306 in different computing devices 1300 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the data processing device. That is, the instructions stored in the memory 1306 of different computing devices 1300 can implement the functions of one or more of the aforementioned acquisition and processing modules.

[0215] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 15 One possible implementation method is shown. Figure 15 This is a schematic diagram of another computing device cluster structure provided in this application. Figure 15 As shown, in the computing device cluster 1500, two computing devices 1300A and 1300B are connected via a network. Specifically, they are connected to the network through the communication interfaces in each computing device. In this possible implementation, the memory 1306 in computing device 1300A stores instructions for executing the functions of the acquisition module. Simultaneously, the memory 1306 in computing device 1300B stores instructions for executing the functions of the processing module.

[0216] It should be understood that Figure 15 The functions of computing device 1300A shown can also be performed by multiple computing devices 1300. Similarly, the functions of computing device 1300B can also be performed by multiple computing devices 1300.

[0217] This application also provides a chip comprising a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer execution instructions stored in a storage unit to cause the chip within the electronic device to perform the methods described in the above embodiments. Optionally, the storage unit may be an in-chip storage unit, such as a register or cache. Alternatively, the storage unit may be an external storage unit located within a wireless access device, such as a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).

[0218] For details, please refer to Figure 16 , Figure 16This application provides a schematic diagram of a chip structure, which can be represented as a neural processing unit (NPU), a graphics processing unit (GPU), or a tensor processing unit (TPU). The following description uses an NPU 1600 as an example. The NPU 1600 is mounted as a coprocessor on the host CPU, which allocates tasks. The core of the NPU is the arithmetic circuit 1603, which is controlled by a controller 1604 to retrieve matrix data from memory and perform multiplication operations.

[0219] In some implementations, the arithmetic circuit 1603 internally includes multiple processing engines (PEs). In some implementations, the arithmetic circuit 1603 is a two-dimensional pulsating array. The arithmetic circuit 1603 can also be a one-dimensional pulsating array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1603 is a general-purpose matrix processor.

[0220] For example, suppose we have an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from the weight memory 1602 and caches it in each PE of the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from the input memory 1601 and performs matrix operations with matrix B. The partial result or the final result of the obtained matrix is ​​stored in the accumulator 1608.

[0221] Unified memory 1606 is used to store input and output data. Weight data is directly transferred to weight memory 1602 via Direct Memory Access Controller (DMAC) 1605. Input data is also transferred to unified memory 1606 via DMAC.

[0222] BIU stands for Bus Interface Unit, which is used for interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1609.

[0223] The Bus Interface Unit (BIU) 1610 is used by the instruction fetch memory 1609 to fetch instructions from external memory, and also by the memory access controller 1605 to fetch the original data of the input matrix A or the weight matrix B from external memory.

[0224] The DMAC is mainly used to move input data from external memory DDR to unified memory 1606, or to weight data to weight memory 1602, or to input data to input memory 1601.

[0225] The vector computation unit 1607 includes multiple processing units that further process the output of the computation circuit 1603 when needed, such as vector multiplication, vector addition, exponential operations, logarithmic operations, size comparisons, etc. It is mainly used for computation in non-convolutional / fully connected layers of neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.

[0226] In some implementations, the vector computation unit 1607 can store the processed output vector in the unified memory 1606. For example, the vector computation unit 1607 can apply a linear function, or a nonlinear function, to the output of the computation circuit 1603, such as performing linear interpolation on the feature planes extracted by the convolutional layer, or, for example, accumulating a vector of values ​​to generate activation values. In some implementations, the vector computation unit 1607 generates normalized values, pixel-level summed values, or both. In some implementations, the processed output vector can be used as an activation input to the computation circuit 1603, for example, for use in subsequent layers of the neural network.

[0227] The instruction fetch buffer 1609 connected to the controller 1604 is used to store the instructions used by the controller 1604.

[0228] The unified memory 1606, input memory 1601, weight memory 1602, and instruction fetch memory 1609 are all on-chip memories. External memory is proprietary to this NPU hardware architecture.

[0229] The processor mentioned above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above program.

[0230] Please refer to Figure 17 , Figure 17 This is a schematic diagram of a computer-readable storage medium provided in this application. This application also provides a computer-readable storage medium in some embodiments, wherein the above-described... Figure 3 The disclosed method can be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or articles of art.

[0231] Figure 17A conceptual partial view of an example computer-readable storage medium arranged according to at least some of the embodiments shown herein is illustrated schematically. The example computer-readable storage medium includes a computer program for executing computer processes on a computing device.

[0232] In one embodiment, the computer-readable storage medium 1700 is provided using a signal bearer medium 1701. The signal bearer medium 1701 may include one or more program instructions 1702, which, when executed by one or more processors, can provide the above-mentioned... Figure 3 The described function or part of the function.

[0233] In some examples, the signal carrying medium 1701 may include a computer-readable medium 1703, such as, but not limited to, a hard disk drive, a compact disc (CD), a digital video disc (DVD), a digital magnetic tape, a memory, ROM, or RAM, etc.

[0234] In some embodiments, the signal-bearing medium 1701 may include a computer-recordable medium 1704, such as, but not limited to, a memory, a read / write (R / W) CD, a R / W DVD, etc. In some embodiments, the signal-bearing medium 1701 may include a communication medium 1705, such as, but not limited to, digital and / or analog communication media (e.g., fiber optic cables, waveguides, wired communication links, wireless communication links, etc.). Therefore, for example, the signal-bearing medium 1701 may be transmitted by a wireless communication medium 1705 (e.g., a wireless communication medium conforming to the IEEE 1202.X standard or other transmission protocols).

[0235] One or more program instructions 1702 may be, for example, computer-executable instructions or logical implementation instructions. In some examples, the computing device may be configured to provide various operations, functions, or actions in response to one or more program instructions 1702 conveyed to the computing device via a computer-readable medium 1703, a computer-recordable medium 1704, and / or a communication medium 1705.

[0236] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the accompanying drawings of the device embodiments provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0237] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods of the various embodiments of this application.

[0238] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0239] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, computer instructions can be transferred from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A data processing method, characterized in that, include: Retrieve multiple data objects; Perform feature extraction on each of the plurality of data objects to obtain and cache at least one feature of each data object, wherein the at least one feature is a feature that will be reused by the plurality of operators when processing the plurality of data objects; Obtain a first request message from a first operator among the plurality of operators. The first request message is used to request the acquisition of a target feature of a data object in a first data set. The first data set includes at least one data object among the plurality of data objects, and the target feature belongs to the at least one feature. Based on the cached at least one feature, the target feature of the data object in the first data set is sent to the first operator, and the first operator is used to remove or modify the data object in the first data set based on the target feature of the data object in the first data set.

2. The method according to claim 1, characterized in that, The target feature is a feature that the first operator will use repeatedly, and / or the target feature is a feature that both the first operator and the second operator will use; The plurality of operators includes the second operator.

3. The method according to claim 1 or 2, characterized in that, The first operator is used to remove some data objects from the first data set based on the target features of the data objects in the first data set to obtain a second data set. The method further includes: Obtain a second request message from the second operator, the second request message being used to request the acquisition of target features of data objects in the second data set, wherein the plurality of operators includes the second operator; Based on the cached at least one feature, the target feature of the data object in the second data set is sent to the second operator, which is used to remove or modify the data object in the second data set based on the target feature of the data object in the second data set.

4. The method according to claim 1 or 2, characterized in that, The first operator is used to modify a target data object in the first data set based on the target features of the data objects in the first data set to obtain a modified first data set. The modified first data set includes the target object modified by the first operator and data objects that do not need to be modified. The data objects that do not need to be modified are data objects in the first data set other than the target data object. The method further includes: Obtain the modified target data object sent by the first operator; Obtain a third request message from a third operator, wherein the plurality of operators include the third operator, and the third request message is used to request the acquisition of the target features of the data objects in the modified first data set; Identify the modified target data object in the modified first data set, and determine the target features of the modified target data object; Based on the cached target features of the data object that does not need modification and the target features of the modified target data object that has been determined, the target features of the modified target data object and the target features of the data object that does not need modification are sent to the third operator.

5. The method according to claim 4, characterized in that, Determining the modified target data object in the modified first data set includes: obtaining a state record structure, wherein the state record structure is used to record the modification state of the multiple data objects by multiple operators; Based on the state record structure, the modified target data object in the modified first data set is determined.

6. The method according to claim 5, characterized in that, Each of the plurality of data objects corresponds to a set of elements in the state record structure, each of the set of elements corresponds to one of the plurality of operators, and the value of each element is used to indicate whether the data object has been modified by the operator corresponding to the element.

7. The method according to claim 5 or 6, characterized in that, The step of determining the modified target data object in the modified first data set based on the state record structure includes: Obtain a feature set, which is used to record at least one feature of each data object among the plurality of data objects and the version of each feature, wherein the version of each feature is used to indicate the version information of the data object corresponding to the feature being modified by the plurality of operators; Based on the state record structure and the versions of the features recorded in the feature set, the modified target data object in the modified first data set is determined.

8. The method according to claim 7, characterized in that, Determining the target features of the modified target data object includes: Based on the modification method of the first operator on the target data object, the target features of the target data object recorded in the feature set are modified to obtain the target features of the modified target data object.

9. The method according to any one of claims 1-8, characterized in that, At least one feature of each of the plurality of data objects is obtained by performing feature extraction on each data object at a preset granularity; When the data object for feature extraction is text data, the preset granularity includes at least one of the following granularities: character, word, paragraph, and data ontology; Alternatively, when the data object for feature extraction is audio data, the preset granularity includes audio segments and / or the data body; Alternatively, when the data object for feature extraction is image data, the preset granularity includes image blocks and / or the data body; Alternatively, when the data object for feature extraction is video data, the preset granularity includes images and / or the data ontology.

10. The method according to any one of claims 1-9, characterized in that, The multiple data objects are applied to any of the following scenarios: model training or model inference.

11. A data processing apparatus, characterized in that, include: The retrieval module is used to retrieve multiple data objects; The processing module is used to perform feature extraction on each of the plurality of data objects, obtain and cache at least one feature of each data object, wherein the at least one feature is a feature that will be reused by the plurality of operators when processing the plurality of data objects; The acquisition module is further configured to acquire a first request message from a first operator among the plurality of operators. The first request message is configured to request the acquisition of a target feature of a data object in a first data set. The first data set includes at least one data object among the plurality of data objects, and the target feature belongs to the at least one feature. The sending module is further configured to send the target features of the data objects in the first data set to the first operator based on the cached at least one feature, wherein the first operator is configured to remove or modify the data objects in the first data set based on the target features of the data objects in the first data set.

12. The apparatus according to claim 11, characterized in that, The target feature is a feature that the first operator will repeatedly use when processing data, and / or the target feature is a feature that both the first operator and the second operator will use when processing data; The plurality of operators includes the second operator.

13. The apparatus according to claim 11 or 12, characterized in that, The first operator is used to remove some data objects from the first data set based on the target features of the data objects in the first data set to obtain a second data set; The acquisition module is further configured to acquire a second request message from the second operator, the second request message being used to request the acquisition of target features of data objects in the second data set, wherein the plurality of operators includes the second operator; The sending module is further configured to send the target features of the data objects in the second data set to the second operator based on at least one cached feature, and the second operator is configured to remove or modify the data objects in the second data set based on the target features of the data objects in the second data set.

14. The apparatus according to claim 11 or 12, characterized in that, The first operator is used to modify the target data object in the first data set based on the target features of the data object in the first data set to obtain a modified first data set. The modified first data set includes the target object modified by the first operator and data objects that do not need to be modified. The data objects that do not need to be modified are data objects in the first data set other than the target data object. The acquisition module is further configured to acquire the modified target data object sent by the first operator; The acquisition module is further configured to acquire a third request message from a third operator, wherein the plurality of operators include the third operator, and the third request message is configured to request the acquisition of the target features of the data objects in the modified first data set; The processing module is further configured to determine the modified target data object in the modified first data set, and to determine the target features of the modified target data object; The sending module is further configured to send the target features of the target data object and the target features of the data object that do not need to be modified to the third operator based on the cached target features of the data object that does not need to be modified and the target features of the modified target data object that has been determined.

15. The apparatus according to claim 14, characterized in that, Before the processing module determines the target features of the modified target data object, the acquisition module is further configured to acquire a state record structure, which is used to record the modification state of the multiple data objects by multiple operators. The processing module is further configured to determine the modified target data object in the modified first data set based on the state record structure.

16. The apparatus according to claim 15, characterized in that, Each of the plurality of data objects corresponds to a set of elements in the state record structure, each of the set of elements corresponds to one of the plurality of operators, and the value of each element is used to indicate whether the data object has been modified by the operator corresponding to the element.

17. The apparatus according to claim 15 or 16, characterized in that, The acquisition module is further configured to acquire a feature set, which is used to record at least one feature of each data object among the plurality of data objects and the version of each feature, wherein the version of each feature is used to indicate the version information of the data object corresponding to the feature being modified by the plurality of operators; The processing module is further configured to determine the modified target data object in the modified first data set based on the state record structure and the version of the features recorded in the feature set.

18. The apparatus according to any one of claims 14-17, characterized in that, The processing module is further configured to: Based on the modification method of the first operator on the target data object, the target features of the target data object recorded in the feature set are modified to obtain the target features of the modified target data object.

19. A computing device, characterized in that, The device includes a memory and a processor; the memory stores code, and the processor is configured to execute the code, wherein when the code is executed, the computing device performs the method as described in any one of claims 1 to 10.

20. A computing device cluster, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the operational steps of the method as described in any one of claims 1 to 10.

21. A chip system, characterized in that, The chip system includes a processor and a communication interface, the communication interface being used to communicate with modules outside the chip system, and the processor being used to execute the method as described in any one of claims 1 to 10.

22. A computer storage medium, characterized in that, The computer storage medium stores instructions that, when executed by the computer, cause the computer to perform the method according to any one of claims 1 to 10.

23. A computer program product, characterized in that, The computer program product stores instructions that, when executed by a computer, cause the computer to perform the method described in any one of claims 1 to 10.