Data sending method, device, equipment and medium

By differentiating the sending methods according to the importance of sample data, the problems of data transmission congestion and packet loss in model inference service training are solved, and efficient and reliable data transmission and consistent training between multiple model inference service replicas are achieved.

CN119299446BActive Publication Date: 2025-09-26BAIDU (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411331386.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-09-26
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

In model inference services, the transmission of training data is prone to congestion or packet loss, affecting the synchronous iteration of model optimization training.

Method used

According to the importance of the sample data, the first identifier is used to distinguish and send it. High-importance data is directly sent to the model inference service for synchronous transmission, and low-importance data is sent to the buffer module for asynchronous transmission. It will be sent after the storage time or data volume threshold is met.

Benefits of technology

This avoids congestion and packet loss during data transmission, ensuring the reliability of data transmission and consistency between multiple model inference service replicas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299446B_ABST
    Figure CN119299446B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data sending method, apparatus, device and medium, which relate to the field of data transmission technology, and in particular to the field of artificial intelligence technology. The implementation scheme is as follows: obtaining multiple sample data for training a neural network model, each sample data including a first identifier that can indicate the importance of the sample data; for each sample data in the multiple sample data, in response to determining that the first identifier of the sample data is a first value, sending the sample data to a model inference service running a neural network model instance, so that the model inference service can train the model instance based on the sample data; and in response to determining that the first identifier of the sample data is a second value, sending the sample data to a buffer module, so that the buffer module can send the sample data to the model inference service when a preset condition is met, and the importance of the sample data indicated by the first value is higher than the importance of the sample data indicated by the second value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data transmission technology, in particular to the field of artificial intelligence technology, and specifically to a data sending method, device, electronic device, computer-readable storage medium, and computer program product. Background Art

[0002] Artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.

[0003] Complex neural network models offer excellent performance, but deploying model inference services with these instances requires significant storage and computing resources. When training data needs to be transmitted to the model inference service for model optimization and training, data transmission congestion or packet loss may occur, impacting the synchronization and iteration of the model inference service.

[0004] The approaches described in this section are not necessarily approaches that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any approach described in this section is prior art simply by virtue of its inclusion in this section. Similarly, unless otherwise indicated, the issues raised in this section should not be considered as having been recognized in any prior art. Summary of the Invention

[0005] The present disclosure provides a data sending method, a training method and device for a neural network model, an electronic device, a computer-readable storage medium, and a computer program product.

[0006] According to one aspect of the present disclosure, a data sending method is provided, comprising: obtaining a plurality of sample data for training a neural network model, wherein each of the plurality of sample data includes a first identifier capable of indicating a degree of importance of the sample data, and wherein the neural network model is used to perform at least one of the following tasks: speech recognition, speech synthesis, image processing, natural language processing, target detection, data generation, and trend prediction; for each of the plurality of sample data, in response to determining that the first identifier of the sample data is a first value, sending the sample data to a model inference service running a model instance corresponding to the neural network model, so that the model inference service can train the model instance based on the sample data; and in response to determining that the first identifier of the sample data is a second value, sending the sample data to a buffer module, so that the buffer module can send the sample data to the model inference service when a preset condition is met, wherein the preset condition includes that a storage time of the sample data in the buffer module exceeds a time threshold or an amount of data stored in the buffer module exceeds a first data amount threshold, and wherein the degree of importance of the sample data indicated by the first value is higher than the degree of importance of the sample data indicated by the second value.

[0007] According to one aspect of the present disclosure, a method for training a neural network model is provided, wherein the neural network model is used to perform at least one of the following tasks: speech recognition, speech synthesis, image processing, natural language processing, target detection, data generation and trend prediction, and the method is executed by a model inference service running a model instance corresponding to the neural network model, and the method includes: in response to receiving sample data for training the neural network model, training the model instance based on the sample data, wherein the sample data is sent according to the data sending method as described above.

[0008] According to another aspect of the present disclosure, a data sending device is provided, comprising: an acquisition unit configured to acquire a plurality of sample data for training a neural network model, wherein each of the plurality of sample data comprises a first identifier capable of indicating a degree of importance of the sample data, and wherein the neural network model is used to perform at least one of the following tasks: speech recognition, speech synthesis, image processing, natural language processing, target detection, data generation, and trend prediction; a first sending unit configured to, for each of the plurality of sample data, in response to determining that the first identifier of the sample data is a first value, send the sample data to a model implementation corresponding to the neural network model; an example of a model inference service, so that the model inference service can train the model instance based on the sample data; and a second sending unit, configured to, for each sample data among the multiple sample data, in response to determining that the first identifier of the sample data is a second value, send the sample data to a buffer module, so that the buffer module can send the sample data to the model inference service when a preset condition is met, wherein the preset condition includes that the storage time of the sample data in the buffer module exceeds a time threshold or the amount of data stored in the buffer module exceeds a first data amount threshold, and wherein the importance of the sample data indicated by the first value is higher than the importance of the sample data indicated by the second value.

[0009] According to another aspect of the present disclosure, a training device for a neural network model is provided, wherein the neural network model is used to perform at least one of the following tasks: speech recognition, speech synthesis, image processing, natural language processing, target detection, data generation and trend prediction, the device includes a model inference service running a model instance corresponding to the neural network model, the device includes: a training unit, configured to train the model instance based on the sample data in response to receiving sample data for training the neural network model, wherein the sample data is sent using the data sending device as described above.

[0010] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above-mentioned data sending method or neural network model training method.

[0011] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned data sending method or neural network model training method.

[0012] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, can implement the above-mentioned data sending method or neural network model training method.

[0013] According to one or more embodiments of the present disclosure, congestion or packet loss in the process of sending sample data to the model inference service can be avoided, thereby ensuring data transmission reliability.

[0014] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings illustrate exemplary embodiments and constitute a part of the specification. Together with the description of the specification, they serve to explain exemplary implementation of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals designate similar, but not necessarily identical, elements.

[0016] Figure 1 A schematic diagram illustrating an exemplary system in which the various methods described herein may be implemented according to exemplary embodiments of the present disclosure;

[0017] Figure 2 A flow chart showing a data transmission method according to an exemplary embodiment of the present disclosure is shown;

[0018] Figure 3 A schematic diagram illustrating a data transmission process according to an exemplary embodiment of the present disclosure is shown;

[0019] Figure 4 A structural block diagram of a data sending device according to an exemplary embodiment of the present disclosure is shown;

[0020] Figure 5 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0021] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0022] In this disclosure, unless otherwise specified, the use of terms such as "first" and "second" to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, while in some cases, based on the context of the description, they may also refer to different instances.

[0023] The terms used in the descriptions of the various examples described in this disclosure are for the purpose of describing specific examples only and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element may be one or more. In addition, the term "and / or" used in this disclosure encompasses any one and all possible combinations of the listed items.

[0024] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0025] Figure 1 FIG2 is a schematic diagram of an exemplary system 100 in which the various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 can be configured to execute one or more applications.

[0026] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the data transmission method to be performed.

[0027] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0028] exist Figure 1In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may, in turn, utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.

[0029] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to send sample data or data transmission requests. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure can support any number of client devices.

[0030] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. The client device is capable of executing various different applications, such as various Internet-related applications, communication applications (eg, email applications), Short Message Service (SMS) applications, and may use various communication protocols.

[0031] The network 110 may be any type of network known to those skilled in the art that can support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0032] Server 120 may include one or more general-purpose computers, specialized server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0033] The computing units in the server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.

[0034] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display the data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.

[0035] In some embodiments, server 120 may be a distributed system server or a server integrated with blockchain. Server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host equipped with artificial intelligence technology. A cloud server is a host product within the cloud computing service system that addresses the management difficulties and poor scalability of traditional physical hosts and virtual private servers (VPS) services.

[0036] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in a variety of locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.

[0037] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.

[0038] Figure 1 The system 100 may be configured and operated in various ways to enable application of the various methods and apparatuses described in accordance with the present disclosure.

[0039] In related technologies, when training a model instance deployed on a model inference service is required, training data must be transferred to the model inference service. However, when the model inference service traffic is high, it may be necessary to configure multiple model inference service replicas, meaning that training data must be transferred to multiple replicas. This can easily lead to congestion when the data volume is large.

[0040] Based on this, the present disclosure provides a data sending method, which differentiates and sends sample data based on its importance. When the first identifier of the sample data indicates that the sample data is of high importance, the sample data is directly sent to the model inference service to realize synchronous transmission. When the importance of the sample data is low, the sample data is sent to the buffer module to realize asynchronous transmission, thereby avoiding congestion or packet loss in the process of sending data to the model inference service and ensuring the reliability of data transmission.

[0041] Figure 2 FIG. 2 shows a flow chart of a data transmission method 200 according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the method 200 includes:

[0042] Step S201: Acquire a plurality of sample data for training a neural network model, wherein each sample data in the plurality of sample data includes a first identifier capable of indicating a degree of importance of the sample data, and wherein the neural network model is used to perform at least one of the following tasks: speech recognition, speech synthesis, image processing, natural language processing, object detection, data generation, and trend prediction;

[0043] Step S202: For each sample data in the plurality of sample data, in response to determining that the first identifier of the sample data is the first value, sending the sample data to a model inference service running a model instance corresponding to the neural network model, so that the model inference service can train the model instance based on the sample data; and

[0044] Step S203: In response to determining that the first identifier of the sample data is the second value, the sample data is sent to the buffer module, so that the buffer module can send the sample data to the model inference service when a preset condition is met, wherein the preset condition includes that the storage time of the sample data in the buffer module exceeds a time threshold or the amount of data stored in the buffer module exceeds a first data amount threshold, and wherein the importance of the sample data indicated by the first value is higher than the importance of the sample data indicated by the second value.

[0045] By applying the above-mentioned method 200, it is possible to differentiate and send sample data based on their importance. When the first identifier of the sample data indicates that the sample data is of high importance, the sample data is directly sent to the model inference service to achieve synchronous transmission. When the importance of the sample data is low, the sample data is sent to the buffer module to achieve asynchronous transmission, thereby avoiding congestion or packet loss in the process of sending data to the model inference service and ensuring data transmission reliability.

[0046] In some examples, sample data may be transmitted simultaneously to multiple model inference services deployed with model instances, so that the multiple model inference services can perform optimization training based on the sample data to ensure consistency among the multiple model inference services.

[0047] In some examples, the neural network model to be trained can be a model of various structures built based on deep learning methods, such as a convolutional neural network model, a feedback neural network model, a feedforward neural network model, etc. The trained neural network model can be used to perform various deep learning-based tasks, such as speech recognition, speech synthesis, image processing, natural language processing, object detection, data generation, and trend prediction.

[0048] In one example, when the neural network model to be trained is a speech recognition model, the sample data corresponding to the neural network model may be speech data to be recognized that is annotated with reference speech recognition results. By using the sample data to perform forward propagation in the speech recognition model, the predicted speech recognition result output by the model can be obtained, and then the loss value is calculated based on the output prediction result and the annotation information. The speech recognition result may be, for example, text information corresponding to the speech data to be recognized. By using the above-mentioned method 200 to transmit the training data of the speech recognition model, the reliability of the training data transmission can be improved. When the model inference service has multiple copies, the sample data required for model training can be transmitted to the multiple copies more efficiently and stably, thereby ensuring consistency between the multiple copies.

[0049] In one example, when the neural network model to be trained is an image processing model, the sample data corresponding to the neural network model can be image data annotated with reference image processing results. By using the sample data to perform forward propagation in the image processing model, the predicted image processing results corresponding to the input image data can be obtained, and the loss value can be calculated based on the output prediction results and the annotated information. The image processing results may include, for example, image classification results, image segmentation results (such as semantic segmentation results or instance segmentation results), image enhancement results (such as enhanced resolution images, sharpened images, denoised images), etc.

[0050] In one example, when the neural network model to be trained is a trend prediction model, the sample data corresponding to the neural network model can be historical data annotated with reference prediction results or data that can describe the distribution characteristics of historical data. Historical data may include, for example, historical weather data, historical user behavior characteristic data, etc. Using this trend prediction model, trend prediction results can be obtained, and then the loss value can be calculated based on the output prediction results and the annotated information. Trend prediction results may include, for example, weather prediction results, prediction results on whether a user will perform a preset action (such as browsing a certain page or purchasing a certain item), etc.

[0051] In one example, when the neural network model to be trained is a natural language processing model, the sample data corresponding to the neural network model can be natural language text. By using the sample data to perform forward propagation in the image processing model, the text processing results corresponding to the natural language text can be obtained. The text processing results may include, for example, reply text generated for the question information contained in the input text, search results based on the input text, and results of processing the natural language paragraph contained in the input text (such as the summary information of the paragraph, entity information or structured information extracted from the paragraph). In this example, the sample data can be corpus data, so that the natural language processing model can learn dialogue capabilities based on the corpus data, thereby realizing intelligent interaction with the user.

[0052] In one example, when the neural network model to be trained is a data generation model, the sample data corresponding to the neural network model can be data generation prompt information. By using the sample data to perform forward propagation in the image processing model, a data generation result based on the data generation prompt information can be obtained. The data generation result can include, for example, text or an image.

[0053] Similar to the process described above for training a speech recognition model and using the trained model to perform speech recognition tasks, in the above embodiment, method 200 can also be used to transmit sample data for at least one of the above-mentioned speech synthesis model, image processing model, natural language processing model, data generation model, and trend prediction model, or to transmit sample data required for training a large multimodal model with multiple functions. When the model inference service has multiple replicas, the sample data required for model training can be transmitted to the multiple replicas more efficiently and stably, thereby ensuring consistency among the multiple replicas.

[0054] In some examples, the first identifier of the sample data may be a discretized importance label. As long as the sample data can be distinguished and sent based on the first identifier of the sample data in steps S202 and S203, the present disclosure does not limit the specific form of the first identifier.

[0055] In some examples, certain sending conditions can be configured in step S202 or step S203, so that data can be sent when the sending conditions are met. For example, the sending condition can be that the amount of data to be sent reaches a certain threshold or a data sending request is received, thereby enabling more precise control of the data sending process.

[0056] According to some embodiments, in response to determining that the first identifier of the sample data is a first value, sending the sample data to a model inference service that runs a model instance corresponding to the neural network model includes: in response to determining that the first identifier of the sample data is a first value, sending the sample data to the model inference service via a first interface, and wherein, in response to determining that the first identifier of the sample data is a second value, sending the sample data to the buffer module includes: in response to determining that the first identifier of the sample data is a first value, sending the sample data to the buffer module via a second interface, wherein the data transmission efficiency of the first interface is higher than that of the second interface. Thus, different interfaces can be used to respectively realize synchronous transmission and asynchronous transmission to avoid transmission congestion.

[0057] In some examples, the RPC interface (Remote Procedure Call) can be used in step S202 to achieve synchronous transmission of sample data. In one example, the RPC interface can also implement retry or idempotence functions to ensure that data is not lost.

[0058] In some examples, the buffer module can be implemented using a Kafka service in step S203. It is understood that the buffer module can also be implemented using other means, such as a message queue, as long as it can achieve asynchronous transmission of sample data. As previously mentioned, certain sending conditions can be configured in step S202 or step S203. In this case, the buffer module can also be configured to control the sending of sample data based on the sending conditions.

[0059] According to some embodiments, each sample data in the plurality of sample data includes one or more sub-sample data, and the plurality of sample data is obtained by the following steps: obtaining a plurality of sub-sample data, wherein each sub-sample data in the plurality of sub-sample data includes a second identifier that can indicate the importance of the sub-sample data; grouping the plurality of sub-sample data based on the second identifiers of the plurality of sub-sample data; and determining that the plurality of sample data is a plurality of sample data based on the grouping result, wherein the first identifier of each sample data is determined based on the second identifier of one or more sub-sample data in the sample data. In this way, the sub-sample data can be grouped and packaged based on their importance, so as to efficiently obtain sample data of different importance.

[0060] In some examples, the second identifier of the subsample data may be explicitly recorded in a specific field of the subsample data. The second identifier may be continuous scoring information that can indicate the importance of the subsample data, or a discrete importance label.

[0061] In some examples, the multiple sub-sample data may be sorted based on the second identifiers of the multiple sub-sample data, and then grouped and packaged based on the sorting results.

[0062] According to some embodiments, grouping the plurality of subsample data based on the second identifiers of the plurality of subsample data includes grouping the plurality of subsample data based on the second identifiers of the plurality of subsample data and the data volume of the plurality of subsample data, and wherein the first identifier of each sample data is determined based on the second identifier and the data volume of one or more subsample data in the sample data. Thus, grouping can be performed based on the data volume of the subsample data, so that the first identifier can also indicate the data volume of the sample data, facilitating differentiated transmission of the sample data based on the data volume during data transmission.

[0063] In some examples, during the process of grouping and packaging the multiple sub-sample data, a deduplication operation may also be performed on the multiple sub-sample data to improve data transmission efficiency.

[0064] In some examples, the first identifier may include three types: A, B, and C. Type A may indicate sample data with high importance and small data volume, Type B may indicate sample data with high importance and large data volume, and Type C may indicate sample data with low importance.

[0065] According to some embodiments, the data volume of the sample data indicated by the first value does not exceed the second data volume threshold. Thus, the data volume of the data packet with the first identifier of the first value (i.e., the data packet performing synchronous transmission) can be limited to not exceed the preset threshold, thereby avoiding congestion of the synchronous transmission link and further improving the reliability of data transmission.

[0066] According to some embodiments, method 200 further includes: for each sample data among the plurality of sample data, in response to determining that the first identifier of the sample data is a third value, sending the sample data to the buffer module, so that the buffer module can send the sample data to the model inference service upon receiving a sample data sending request, wherein the data volume of the sample data indicated by the third value exceeds the second data volume threshold. In this way, the transmission of a large amount of sample data can be triggered by an external request, thereby avoiding congestion in the data transmission link and further improving the reliability of data transmission.

[0067] Figure 3 FIG. 1 shows a schematic diagram of a data transmission process according to an exemplary embodiment of the present disclosure. Figure 3 As shown, in this example, model inference service 311 and model inference service 312 are distributed service resources deployed in parallel, each of which contains a model instance of a neural network model. Kafka service 321 is used to implement the asynchronous transmission of sample data in step S203 above. RPC interface 322 is used to implement the real-time synchronous transmission of sample data in step S202 above. It can also be used to issue training instructions to the model inference service. Data transmission service 323 is used to implement the aforementioned step of grouping and packaging multiple sub-sample data.

[0068] According to one aspect of the present disclosure, a training method for a neural network model is also provided. In some embodiments, the neural network model is used to perform at least one of the following tasks: speech recognition, speech synthesis, image processing, natural language processing, target detection, data generation and trend prediction. The method is executed by a model inference service running a model instance corresponding to the neural network model, and the method includes: in response to receiving sample data for training the neural network model, training the model instance based on the sample data, wherein the sample data is sent using the above-mentioned data sending method 200. By applying the above-mentioned training method for the neural network model, the sample data required for model training can be transmitted more efficiently and stably to improve the reliability of the model training iteration.

[0069] In some examples, sample data may be transmitted simultaneously to multiple model inference services deployed with model instances, so that the multiple model inference services can perform optimization training based on the sample data to ensure consistency among the multiple model inference services.

[0070] In some examples, training the model instance based on the sample data using the sample data includes: in response to determining that the first identifier of the sample data is the second value, and in response to the amount of sample data whose first identifier is the second value exceeding a third data amount threshold, training the model instance based on the sample data. In this way, training can be performed after a certain amount of sample data (i.e., data with lower importance) whose first identifier is the second value accumulates to a certain amount, thereby achieving a buffer of training data volume and avoiding a run on hardware resources caused by high data concurrency.

[0071] In some examples, the first identifier of each sample data item can also indicate the data volume of the sample data item, and using the sample data item to train the model instance based on the sample data item includes: in response to determining that the first identifier of the sample data item is the third value, and in response to receiving a training instruction for the sample data item whose first identifier item is the third value, training the model instance based on the sample data item. In this way, external requests can be used to trigger the training of large amounts of sample data, thereby avoiding resource congestion in the automatic control process.

[0072] According to one aspect of the present disclosure, a data transmitting device is also provided. Figure 4 FIG. 4 shows a data transmitting apparatus 400 according to an exemplary embodiment of the present disclosure. Figure 4 As shown, the apparatus 400 includes:

[0073] An acquisition unit 401 is configured to acquire a plurality of sample data for training a neural network model, wherein each sample data in the plurality of sample data includes a first identifier capable of indicating a degree of importance of the sample data, and wherein the neural network model is used to perform at least one of the following tasks: speech recognition, speech synthesis, image processing, natural language processing, object detection, data generation, and trend prediction;

[0074] a first sending unit 402 configured to, for each sample data among the plurality of sample data, send the sample data to a model inference service running a model instance corresponding to the neural network model in response to determining that the first identifier of the sample data is the first value, so that the model inference service can train the model instance based on the sample data; and

[0075] The second sending unit 403 is configured to send, for each sample data among the multiple sample data, the sample data to the buffer module in response to determining that the first identifier of the sample data is the second value, so that the buffer module can send the sample data to the model inference service when a preset condition is met, wherein the preset condition includes that the storage time of the sample data in the buffer module exceeds a time threshold or the amount of data stored in the buffer module exceeds a first data amount threshold, and wherein the importance of the sample data indicated by the first value is higher than the importance of the sample data indicated by the second value.

[0076] According to some embodiments, each sample data among the multiple sample data includes one or more sub-sample data, and the multiple sample data are obtained using a data generation unit, and the data generation unit includes: an acquisition module, configured to acquire multiple sub-sample data, wherein each sub-sample data among the multiple sub-sample data includes a second identifier that can indicate the importance of the sub-sample data; a grouping module, configured to group the multiple sub-sample data based on the second identifiers of the multiple sub-sample data; and a determination module, configured to determine that they are multiple sample data based on the grouping result, wherein the first identifier of each sample data is determined based on the second identifiers of one or more sub-sample data in the sample data.

[0077] According to some embodiments, the grouping module is configured to: group the multiple sub-sample data based on the second identifiers of the multiple sub-sample data and the data volume of the multiple sub-sample data, and wherein the first identifier of each sample data is determined based on the second identifier and data volume of one or more sub-sample data in the sample data.

[0078] According to some embodiments, the data volume of the sample data indicated by the first value does not exceed a second data volume threshold.

[0079] According to some embodiments, the device 400 also includes: a third sending unit, configured to send the sample data to the buffer module for each sample data among the multiple sample data in response to determining that the first identifier of the sample data is a third value, so that the buffer module can send the sample data to the model inference service when receiving a sample data sending request, wherein the data volume of the sample data indicated by the third value exceeds the second data volume threshold.

[0080] According to some embodiments, the first sending unit is configured to: in response to determining that the first identifier of the sample data is a first value, send the sample data to the model inference service via a first interface, and wherein the second sending unit is configured to: in response to determining that the first identifier of the sample data is the first value, send the sample data to the buffer module via a second interface, wherein the data transmission efficiency of the first interface is higher than that of the second interface.

[0081] According to one aspect of the present disclosure, a training device for a neural network model is also provided. In some embodiments, the neural network model is used to perform at least one of the following tasks: speech recognition, speech synthesis, image processing, natural language processing, target detection, data generation, and trend prediction. The device includes a model inference service running a model instance corresponding to the neural network model. The training device for the neural network model includes: a training unit configured to, in response to receiving sample data for training the neural network model, train the model instance based on the sample data, wherein the sample data is sent using the above-mentioned data sending device 400.

[0082] According to some embodiments, the training unit is configured to: in response to determining that the first identifier of the sample data is the second value, and in response to the data volume of the sample data whose first identifier is the second value exceeds a third data volume threshold, train the model instance based on the sample data.

[0083] According to some embodiments, the first identifier of each sample data can also indicate the data amount of the sample data, and the training unit is configured to: in response to determining that the first identifier of the sample data is the third value, and in response to receiving a training instruction for the sample data whose first identifier is the third value, train the model instance based on the sample data.

[0084] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above-mentioned data sending method or neural network model training method.

[0085] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned data sending method or neural network model training method.

[0086] According to another aspect of the present disclosure, a computer program product is also provided, comprising a computer program, wherein the computer program implements the above-mentioned data sending method or neural network model training method when executed by a processor.

[0087] refer to Figure 5 , a block diagram of an electronic device 500 that can serve as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0088] like Figure 5 As shown, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the device 500 can also be stored in the RAM 503. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0089] Multiple components within device 500 are connected to I / O interface 505, including an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. Input unit 506 can be any device capable of inputting information into device 500. Input unit 506 can receive input numeric or character information and generate key signal input related to user settings and / or function control of the electronic device. It may include, but is not limited to, a mouse, keyboard, touch screen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 507 can be any device capable of presenting information and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. Storage unit 508 may include, but is not limited to, a magnetic disk or an optical disk. Communication unit 509 allows device 500 to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunication networks. It may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver and / or chipset, such as a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0090] The computing unit 501 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as the data transmission method. For example, in some embodiments, the data transmission method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the data transmission method described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the data transmission method by any other appropriate means (e.g., by means of firmware).

[0091] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0092] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0093] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0094] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0095] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0096] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0097] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.

[0098] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples. Various elements in the embodiments or examples may be omitted or replaced by their equivalent elements. In addition, each step may be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A data transmission method, comprising: Acquiring a plurality of sample data for training a neural network model, wherein each sample data in the plurality of sample data includes a first identifier capable of indicating a degree of importance of the sample data, and wherein the neural network model is used to perform at least one of the following tasks: speech recognition, speech synthesis, image processing, natural language processing, object detection, data generation, and trend prediction; For each sample data in the plurality of sample data, In response to determining that the first identifier of the sample data is the first value, sending the sample data to a model inference service running a model instance corresponding to the neural network model, so that the model inference service can train the model instance based on the sample data; and In response to determining that the first identifier of the sample data is a second value, the sample data is sent to a buffer module so that the buffer module can send the sample data to the model inference service when a preset condition is met, wherein the preset condition includes that the storage time of the sample data in the buffer module exceeds a time threshold or the amount of data stored in the buffer module exceeds a first data amount threshold, and wherein the importance of the sample data indicated by the first value is higher than the importance of the sample data indicated by the second value.

2. The method according to claim 1, wherein Each sample data in the plurality of sample data includes one or more sub-sample data, and the plurality of sample data are obtained by using the following steps: Acquire a plurality of sub-sample data, wherein each sub-sample data in the plurality of sub-sample data includes a second identifier capable of indicating a degree of importance of the sub-sample data; grouping the plurality of sub-sample data based on the second identifiers of the plurality of sub-sample data; and The plurality of sample data are determined based on the grouping result, wherein the first identifier of each sample data is determined based on the second identifier of one or more sub-sample data in the sample data.

3. The method according to claim 2, wherein: The grouping the plurality of sub-sample data based on the second identifiers of the plurality of sub-sample data includes: grouping the plurality of sub-sample data based on the second identifiers of the plurality of sub-sample data and the data amounts of the plurality of sub-sample data; And wherein, the first identifier of each sample data is determined based on the second identifier and data amount of one or more sub-sample data in the sample data.

4. The method according to claim 3, wherein: The data volume of the sample data indicated by the first value does not exceed a second data volume threshold.

5. The method of claim 4, further comprising: For each sample data among the multiple sample data, in response to determining that the first identifier of the sample data is a third value, the sample data is sent to the buffer module, so that the buffer module can send the sample data to the model inference service when receiving a sample data sending request, wherein the data volume of the sample data indicated by the third value exceeds the second data volume threshold.

6. The method according to any one of claims 1 to 5, wherein In response to determining that the first identifier of the sample data is the first value, sending the sample data to a model inference service running a model instance corresponding to the neural network model includes: In response to determining that the first identifier of the sample data is the first value, sending the sample data to the model inference service via the first interface, And wherein, in response to determining that the first identifier of the sample data is the second value, sending the sample data to the buffer module includes: In response to determining that the first identifier of the sample data is the first value, the sample data is sent to the buffer module via the second interface, wherein the data transmission efficiency of the first interface is higher than that of the second interface.

7. A method for training a neural network model, wherein: The neural network model is used to perform at least one of the following tasks: speech recognition, speech synthesis, image processing, natural language processing, target detection, data generation, and trend prediction. The method is executed by a model inference service running a model instance corresponding to the neural network model, and the method includes: In response to receiving sample data for training the neural network model, training the model instance based on the sample data, wherein the sample data is sent using the method of any one of claims 1-6.

8. The method of claim 7, wherein: The using the sample data to train the model instance based on the sample data includes: In response to determining that the first identifier of the sample data is the second value, and in response to the data volume of the sample data whose first identifier is the second value exceeds a third data volume threshold, the model instance is trained based on the sample data.

9. The method according to claim 7 or 8, wherein The first identifier of each sample data can also indicate the data volume of the sample data, and the training of the model instance based on the sample data using the sample data includes: In response to determining that the first identifier of the sample data is a third value, and in response to receiving a training instruction for the sample data whose first identifier is the third value, the model instance is trained based on the sample data, wherein the data volume of the sample data indicated by the first value does not exceed a second data volume threshold, and the data volume of the sample data indicated by the third value exceeds the second data volume threshold.

10. A data sending device, comprising: an acquisition unit configured to acquire a plurality of sample data for training a neural network model, wherein each sample data in the plurality of sample data includes a first identifier capable of indicating a degree of importance of the sample data, and wherein the neural network model is used to perform at least one of the following tasks: speech recognition, speech synthesis, image processing, natural language processing, object detection, data generation, and trend prediction; a first sending unit configured to, for each sample data among the plurality of sample data, send the sample data to a model inference service running a model instance corresponding to the neural network model in response to determining that the first identifier of the sample data is a first value, so that the model inference service can train the model instance based on the sample data; and The second sending unit is configured to send, for each sample data among the multiple sample data, the sample data to the buffer module in response to determining that the first identifier of the sample data is the second value, so that the buffer module can send the sample data to the model inference service when a preset condition is met, wherein the preset condition includes that the storage time of the sample data in the buffer module exceeds a time threshold or the amount of data stored in the buffer module exceeds a first data amount threshold, and wherein the importance of the sample data indicated by the first value is higher than the importance of the sample data indicated by the second value.

11. The device according to claim 10, wherein Each sample data in the plurality of sample data includes one or more sub-sample data, and the plurality of sample data is obtained by using a data generating unit, and the data generating unit includes: an acquisition module configured to acquire a plurality of sub-sample data, wherein each sub-sample data of the plurality of sub-sample data includes a second identifier capable of indicating a degree of importance of the sub-sample data; a grouping module configured to group the plurality of sub-sample data based on the second identifiers of the plurality of sub-sample data; and The determination module is configured to determine the plurality of sample data based on the grouping result, wherein the first identifier of each sample data is determined based on the second identifier of one or more sub-sample data in the sample data.

12. The device according to claim 11, wherein The grouping module is configured to: grouping the plurality of sub-sample data based on the second identifiers of the plurality of sub-sample data and the data amounts of the plurality of sub-sample data; And wherein, the first identifier of each sample data is determined based on the second identifier and data amount of one or more sub-sample data in the sample data.

13. The device of claim 12, wherein: The data volume of the sample data indicated by the first value does not exceed a second data volume threshold.

14. The apparatus of claim 13, further comprising: The third sending unit is configured to send, for each sample data among the multiple sample data, the sample data to the buffer module in response to determining that the first identifier of the sample data is a third value, so that the buffer module can send the sample data to the model inference service when receiving a sample data sending request, wherein the data volume of the sample data indicated by the third value exceeds the second data volume threshold.

15. The device according to any one of claims 10 to 14, wherein The first sending unit is configured to: In response to determining that the first identifier of the sample data is the first value, sending the sample data to the model inference service via the first interface, And wherein, the second sending unit is configured to: In response to determining that the first identifier of the sample data is the first value, the sample data is sent to the buffer module via the second interface, wherein the data transmission efficiency of the first interface is higher than that of the second interface.

16. A training device for a neural network model, wherein: The neural network model is used to perform at least one of the following tasks: speech recognition, speech synthesis, image processing, natural language processing, target detection, data generation, and trend prediction. The apparatus includes a model inference service running a model instance corresponding to the neural network model, and the apparatus includes: A training unit is configured to, in response to receiving sample data for training the neural network model, train the model instance based on the sample data, wherein the sample data is sent using the device of any one of claims 10-15.

17. The apparatus of claim 16, wherein: The training unit is configured to: In response to determining that the first identifier of the sample data is the second value, and in response to the data volume of the sample data whose first identifier is the second value exceeds a third data volume threshold, the model instance is trained based on the sample data.

18. The device according to claim 16 or 17, wherein The first identifier of each sample data can also indicate the data volume of the sample data, and the training unit is configured to: In response to determining that the first identifier of the sample data is a third value, and in response to receiving a training instruction for the sample data whose first identifier is the third value, the model instance is trained based on the sample data, wherein the data volume of the sample data indicated by the first value does not exceed a second data volume threshold, and the data volume of the sample data indicated by the third value exceeds the second data volume threshold.

19. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 9.

21. A computer program product comprising a computer program, wherein The computer program implements the method according to any one of claims 1 to 9 when executed by a processor.

Citation Information

Patent Citations

  • Deep learning data cache management method and system based on importance perception

    CN114462590A

  • Improving detection of speech-based keywords using error rejected data

    CN118251718A