Data sending method and device, equipment and medium

By distinguishing the sending mechanism based on the importance of sample data, the problems of congestion and packet loss during the transmission of neural network model training data are solved, the reliability and efficiency of data transmission are achieved, and the stability and consistency of model inference services are ensured.

CN119299446AActive Publication Date: 2025-01-10BAIDU (CHINA) CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

In neural network model inference service, the transmission process of training data is prone to congestion or packet loss, which affects the synchronous iteration of model optimization training.

Method used

The data is sent differently according to the importance of the sample data. High-importance data is sent directly to the model inference service, and low-importance data is sent to the buffer module to meet the storage time or data amount threshold before being transmitted to avoid direct transmission to the model inference service.

Benefits of technology

It effectively avoids congestion and packet loss during data transmission, ensures the reliability and efficiency of data transmission, and ensures data consistency between multiple model inference services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299446A_ABST
    Figure CN119299446A_ABST
Patent Text Reader

Abstract

The invention provides a data sending method and device, equipment and a medium, and relates to the technical field of data transmission, in particular to the technical field of artificial intelligence. According to the implementation scheme, multiple pieces of sample data used for training a neural network model are obtained, and each piece of sample data comprises a first identifier capable of indicating the importance degree of the sample data; for each piece of sample data in the multiple pieces 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 reasoning service in which a neural network model instance runs, so that the model reasoning 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 a model reasoning service when a preset condition is met, and the importance degree of the sample data indicated by the first value is higher than that 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 is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0003] Complex neural network models have good performance, but the model inference service deployed with the model instance requires more storage space and computing resources. When training data needs to be transmitted to the model inference service to optimize the model training, data transmission congestion or packet loss may occur, which in turn affects the synchronous iteration of the model inference service.

[0004] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have 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: acquiring 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 the 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 comprises 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.

[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 by 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, there is provided 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 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, there is provided an electronic device, 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 so that the at least one processor can 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, including a computer program, wherein the computer program can implement the above-mentioned data sending method or neural network model training method when executed by a processor.

[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 content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0016] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an exemplary embodiment 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 showing 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 is a description of exemplary embodiments of the present disclosure 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 recognized by those of ordinary skill 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, the description of well-known functions and structures is omitted in the following description.

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

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

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

[0025] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which 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 may 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 may support any number of client devices.

[0030] Client devices 101, 102, 103, 104, 105 and / or 106 may include various categories of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various categories 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, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. The client device is capable of executing a variety of 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 may 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, 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, dedicated 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 above operating systems and 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, etc.

[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 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, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in 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 various 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 may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different categories. 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 categories 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 the application of various methods and apparatuses described in the present disclosure.

[0039] In related technologies, when a model instance deployed on a model inference service needs to be trained, the training data needs to be transferred to the model inference service. However, when the traffic of the model inference service is large, it may be necessary to configure multiple model inference service replicas, that is, it is necessary to transfer training data to multiple replicas, which is prone 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 the importance of the sample data. 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.

[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 the 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;

[0043] Step S202: for each sample data among 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

[0044] Step S203, 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 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 sample data is of low importance, 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, target 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 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 the 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 may 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 then the loss value is calculated based on the output prediction results and annotation 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 may be historical data annotated with reference prediction results or data that can describe the distribution characteristics of historical data. For example, historical data may include historical weather data, historical behavior characteristic data of users, etc. The trend prediction results can be obtained by using the trend prediction model, and then the loss value is calculated based on the output prediction results and the annotation information. The trend prediction results may include, for example, weather prediction results, prediction results of whether the user will perform a preset action (such as browsing a page or purchasing a product), 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 may 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, a reply text generated for the question information contained in the input text, a search result based on the input text, a result 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), etc. In this example, the sample data may be corpus data, so that the natural language processing model can learn the dialogue ability based on the corpus data, and then realize 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 may be data generation prompt information. By using the sample data to perform forward propagation in the image processing model, the result of data generation based on the data generation prompt information can be obtained, and the data generation result may include text or images, for example.

[0053] Similar to the process described above of 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 of at least one of the above speech synthesis model, image processing model, natural language processing model, data generation model, and trend prediction model, or sample data required for training a multimodal large model with multiple functions. 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 among the multiple copies.

[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 may be configured in step S202 or step S203, so that data can be sent when the sending conditions are met. The sending conditions may be, for example, that the amount of data to be sent reaches a certain threshold or that a data sending request is received, so that the data sending process can be controlled more accurately.

[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 running 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 a 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 implement 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 implement synchronous sending of sample data. In one example, the RPC interface can also implement a retry or idempotent function to ensure that data is not lost.

[0058] In some examples, the buffer module can be implemented using the kafka service in step S203. It is understandable that the buffer module can also be implemented based on other means, such as a message queue, as long as the asynchronous transmission of the sample data can be achieved. As mentioned above, certain sending conditions can be configured in step S202 or step S203. In this case, the buffer module can also be configured with a function of controlling the sending of the sample data based on the sending conditions.

[0059] According to some embodiments, each of 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 of 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. Thus, the sub-sample data can be grouped and packaged based on their importance, so as to efficiently obtain sample data with different importance.

[0060] In some examples, the second identifier of the sub-sample data may be explicitly recorded in a specific field of the sub-sample data. The second identifier may be continuous scoring information that can indicate the importance of the sub-sample data, or may be 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 result.

[0062] According to some embodiments, the grouping of 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 volume of the plurality of sub-sample 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 sub-sample data in the sample data. Thus, the sub-sample data can be grouped in combination with the data volume, so that the first identifier can also indicate the data volume of the sample data, which facilitates distinguishing and sending the sample data based on the data volume during data sending.

[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 as the first value (i.e., the data packet for 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 multiple 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 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. Thus, 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 is a schematic diagram showing a data transmission process according to an exemplary embodiment of the present disclosure. Figure 3 As shown, in this example, the model reasoning service 311 and the model reasoning service 312 are distributed service resources deployed in parallel, in which model instances of the neural network model are deployed respectively. The Kafka service 321 is used to implement the asynchronous sending of the sample data in the above step S203, the RPC interface 322 is used to implement the real-time synchronous transmission of the sample data in the above step S202, and can also be used to send training instructions to the model reasoning service, and the data sending service 323 is used to implement the aforementioned grouping and packaging steps for 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 model training iterations.

[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, 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 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. Thus, for sample data whose first identifier is the second value (i.e., data with a lower degree of importance), training can be performed after a certain amount of sample data is accumulated, so as to achieve buffering of the amount of training data and avoid a run on hardware resources caused by high data concurrency.

[0071] In some examples, the first identifier of each sample data can also indicate the data volume of the sample data, and 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 third value, and in response to receiving a training instruction for the sample data whose first identifier is the third value, training the model instance based on the sample data. Thus, the training of sample data with a large data volume can be triggered by using an external request, thereby avoiding resource crowding in the automatic control process.

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

[0073] The acquisition unit 401 is configured to acquire a plurality of sample data for training a neural network model, wherein each sample data of the plurality of sample data includes a first identifier capable of indicating the 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;

[0074] A first sending unit 402 is configured to send, for each sample data among the plurality of sample data, 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

[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 of 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 of 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 a 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 reasoning service running a model instance corresponding to the neural network model, and the training device for the neural network model includes: a training unit, configured to respond to receiving sample data for training the neural network model, and 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, there is also provided an electronic device, 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 so that the at least one processor can 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, including 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 be used 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, workbenches, 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. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. 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 in the device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 can be any type of device that can input information to the device 500. The input unit 506 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 507 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 can include but is not limited to a disk, an optical disk. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a 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 may 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 running 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 a data transmission method. For example, in some embodiments, the data transmission method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the data transmission method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the data transmission method in any other appropriate manner (e.g., by means of firmware).

[0091] Various implementations of the systems and techniques described above herein 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), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including 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 may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0093] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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 backend 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 frontend 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 backend components, middleware components, or frontend 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 the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0097] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded 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, and this document is not limited here.

[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 may be 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 with the evolution of technology, many elements described herein may be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A data transmission method, comprising: 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 the 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 sample data in 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, 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 of 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 of the plurality of sub-sample data includes a second identifier capable of indicating 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 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 of claim 2, wherein: The grouping the plurality of sub-sample data based on the second identifiers of the plurality of sub-sample data comprises: 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 of 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 comprises: 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 performed 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 comprises: 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 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 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.

10. A data sending device, comprising: An acquisition unit is configured to acquire a plurality of sample data for training a neural network model, wherein each sample data 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; 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 a buffer module in response to determining that the first identifier of the sample data is a 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 of claim 10, wherein: Each sample data of the plurality of sample data includes one or more sub-sample data, and the plurality of sample data are obtained by using a data generating unit, and the data generating unit includes: An acquisition module is 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 the 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 of claim 11, wherein: The grouping module is configured as follows: 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 as follows: 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 as: 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, and the device includes a model inference service running a model instance corresponding to the neural network model, and the device 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 apparatus described in any one of claims 10-15.

17. The device of claim 16, wherein: The training unit is configured as follows: 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 method according to claim 16 or 17, wherein: The first identifier of each sample data can also indicate the data amount of the sample data, and the training unit is configured as follows: 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, the model instance is trained based on the sample data.

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 make a computer execute the method according to any one of claims 1-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

  • Distributed deep learning caching method based on sample importance sampling

    CN117076415A

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

    CN118251718A

  • System and method of speech recognition

    US20160180837A1

Cited By

  • Communication method and apparatus

    WO2026166166A1