A business data distribution method and related device
By developing private models and allocating business data based on accuracy, the problem of over-reliance of enterprises on general large models is solved, and the effect of reducing operational costs and supply chain risks is achieved, while improving the flexibility and security of data processing.
Patent Information
- Application Number
- CN202411899927.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-01
AI Technical Summary
Enterprises' over-reliance on general models can face supply chain risks and high operating costs, and it is difficult to achieve flexibility and security in data processing.
By developing private models and allocating business data based on the accuracy of private models and general models, we will gradually reduce our dependence on general models. Specific methods include obtaining the business data to be processed, calculating the accuracy of the private model and the general model, dividing the business data according to the accuracy ratio, and inputting the divided data into the private model and the general model to obtain the prediction results.
Reduces dependence on expensive external resources, reduces operating costs, and reduces supply chain risks faced, while improving the flexibility and security of data processing.
Smart Images

Figure CN119739525A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a business data distribution method and related devices. Background Art
[0002] The application of general large models has become an important part of artificial intelligence solutions. General large models are usually developed by companies or research institutions with abundant resources and advanced technologies, and are widely adopted due to their powerful data processing capabilities and wide range of applications. General large models have completed model training and optimization and can be directly used in various application scenarios.
[0003] The general-purpose big model is provided as a commercial product, and enterprises need to pay a licensing fee or service fee to use it. Over-reliance on the general-purpose big model may expose enterprises to supply chain risks, such as the service provider may stop providing services. Summary of the invention
[0004] In view of the above problems, the present application provides a business data allocation method and related devices to achieve the purpose of reducing the dependence on the general large model. The specific scheme is as follows:
[0005] The first aspect of the present application provides a service data allocation method, comprising:
[0006] Obtain multiple business data to be processed;
[0007] Obtain a first accuracy rate of the private model and a second accuracy rate of the general large model;
[0008] The private model is obtained by training using the business data input to the general large model as input and the prediction result output by the general large model as the training target;
[0009] From the preset correspondence between the accuracy of the private model, the accuracy of the general large model and the business allocation ratio, searching for the target business allocation ratio corresponding to the first accuracy and the second accuracy;
[0010] Dividing the multiple service data into a first service set and a second service set according to the target service allocation ratio, the first service set including the service data that is the product of the number of the multiple service data and the target service allocation ratio; the second service set including the service data among the multiple service data except the first service set;
[0011] Inputting the first service set into the private model, and obtaining prediction results of the service data included in the first service set through the private model;
[0012] The second business set is input into the general large model, and the prediction result of the business data included in the second business set is obtained through the general large model.
[0013] In a possible implementation, the method for obtaining the corresponding relationship between the accuracy of the private model, the accuracy of the general large model and the service allocation ratio includes:
[0014] If the accuracy of the private model is lower than or equal to the first value, determining that the service allocation ratio is 0;
[0015] If the accuracy of the private model is higher than the first value and lower than the accuracy of the general large model, determine the business allocation ratio from a value greater than 0 and less than 1;
[0016] If the accuracy of the private model is higher than or equal to the accuracy of the general large model, the business allocation ratio is determined from a value greater than or equal to 1.
[0017] In a possible implementation, the training method of the private model includes:
[0018] Determining the business data input to the general large model as sample business data and determining the prediction result output by the general large model as the labeled result;
[0019] Using the sample business data as input and the annotation results as training targets, training the private model;
[0020] Inputting the acquired business data into the general large model and the private model respectively, obtaining a first prediction result through the general large model and obtaining a second prediction result through the private model;
[0021] Inputting the business data, the first prediction result, and the second prediction result into a pre-built referee model, and obtaining the accuracy of the private model and the accuracy of the general large model through the referee model;
[0022] The referee model is obtained by training with sample business data, the prediction results of the general large model and the prediction results of the private model as inputs, and with the labeling accuracy of the general large model and the labeling accuracy of the private model as training targets;
[0023] If the accuracy of the private model is less than a second value, returning to the step of determining that the business data input to the general large model is sample business data and determining that the prediction result output by the general large model is a labeled result; the second value is the difference between the accuracy of the general large model and a preset value;
[0024] If the accuracy of the private model is equal to or higher than the second value, the trained private model is obtained.
[0025] In a possible implementation, after the step of acquiring the trained private model, the method further includes:
[0026] At each preset time interval, a preset number of detection service data are obtained from the obtained multiple service data;
[0027] Inputting the detection service data into the general large model and the private model respectively, obtaining a third prediction result through the general large model and obtaining a fourth prediction result through the private model;
[0028] Inputting the detection service data, the third prediction result and the fourth prediction result into the referee model, and obtaining the accuracy of the private model and the accuracy of the general large model through the referee model;
[0029] If the accuracy of the private model is lower than the second value, return to the step of determining that the business data input to the general large model is sample business data and determining that the prediction result output by the general large model is the labeled result.
[0030] In a possible implementation, the method further includes:
[0031] If the accuracy of the private model is higher than or equal to the second value and lower than the accuracy of the general large model, the private model is trained using the detection business data as input and the prediction result of the detection business data output by the general large model as a training target.
[0032] A second aspect of the present application provides a service data distribution device, including:
[0033] A first acquisition module, used to acquire a plurality of business data to be processed;
[0034] A second acquisition module, used to acquire a first accuracy rate of the private model and a second accuracy rate of the general large model;
[0035] The private model is obtained by training using the business data input to the general large model as input and the prediction result output by the general large model as the training target;
[0036] A search module, used for searching the target business allocation ratio corresponding to the first accuracy rate and the second accuracy rate from the preset correspondence between the accuracy rate of the private model, the accuracy rate of the general large model and the business allocation ratio;
[0037] a division module, configured to divide the plurality of service data into a first service set and a second service set according to the target service allocation ratio, wherein the first service set includes service data that is a product of the number of the plurality of service data and the target service allocation ratio; and the second service set includes service data in the plurality of service data except the first service set;
[0038] A third acquisition module, configured to input the first service set into the private model, and obtain a prediction result of the service data included in the first service set through the private model;
[0039] The fourth acquisition module is used to input the second business set into the general large model, and obtain the prediction result of the business data included in the second business set through the general large model.
[0040] In a possible implementation, the method further includes:
[0041] A first determination module, configured to determine that the service allocation ratio is 0 if the accuracy of the private model is lower than or equal to a first value;
[0042] A second determination module, configured to determine the service allocation ratio from a value greater than 0 and less than 1 if the accuracy of the private model is higher than the first value and lower than the accuracy of the general large model;
[0043] The third determination module is used to determine the business allocation ratio from a value greater than or equal to 1 if the accuracy of the private model is higher than or equal to the accuracy of the general large model.
[0044] A third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the business data allocation method of the first aspect or any implementation of the first aspect.
[0045] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0046] The memory is used to store computer programs;
[0047] The processor is used to execute the computer program so that the electronic device can implement the business data distribution method of the first aspect or any implementation manner of the first aspect.
[0048] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the business data distribution method of the first aspect or any implementation method of the first aspect.
[0049] By means of the above technical solution, the present application provides a business data allocation method, when allocating business data, the business data is allocated based on the accuracy of the private model and the general large model; firstly, the target business allocation ratio of the private model and the general large model is determined; thus, multiple business data can be divided based on the target business allocation ratio to obtain a first business set and a second business set; the first business set is input into the private model, and the prediction results of the business data included in the first business set are obtained through the private model; the second business set is input into the general large model, and the prediction results of the business data included in the second business set are obtained through the general large model. The present application reduces the dependence on external expensive resources by gradually replacing the general large model with the private model, thereby reducing operating costs and supply chain risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0051] Figure 1 A schematic diagram of a system architecture provided for this application;
[0052] Figure 2 A schematic diagram of an optional hardware structure of the service distribution terminal 100 provided in this application;
[0053] Figure 3 A schematic diagram of the structure of the server provided for this application;
[0054] Figure 4 A flowchart of a business data allocation method provided in this application;
[0055] Figure 5 A schematic diagram of the structure of a service data distribution device provided by the present application;
[0056] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. DETAILED DESCRIPTION
[0057] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0058] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0059] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0060] General-purpose big models are usually developed by large technology companies or professional artificial intelligence laboratories. They have completed model training and optimization and can be directly used in various application scenarios. General-purpose big models are provided as commercial products, and enterprises need to pay licensing fees or service fees to use these models. Fees may include one-time licensing fees, subscription fees based on usage, or on-demand billing. In order to reduce dependence on external general-purpose big models, reduce costs, and improve the flexibility and security of data processing, more and more enterprises are beginning to explore the development of their own private models. Private models can be customized according to the specific needs of enterprises, better protect data privacy, and provide a higher degree of control.
[0061] In summary, although general-purpose large models provide plug-and-play convenience, they also bring challenges in terms of resource consumption, cost, dependency, and customization. Therefore, developing and deploying private models and realizing intelligent diversion of business data between general-purpose large models and private models have become key strategies for enterprises to maintain their competitiveness in the field of artificial intelligence.
[0062] The present application is described below in conjunction with system architecture, methods and related devices.
[0063] See also Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The system may include a service distribution terminal 100, a first server 200, a second server 300 and a client device 400.
[0064] Exemplarily, the client device 400 may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA) or a server, etc., and the embodiments of the present application do not impose any limitation on this.
[0065] Exemplarily, different users have different client devices 400 , and the users can send service data to the service distribution terminal 100 via the client devices 400 .
[0066] Exemplarily, after the service distribution terminal 100 obtains multiple service data, it can execute the service data distribution method provided in the embodiment of the present application.
[0067] Exemplarily, a large amount of business data is sent to the business distribution terminal 100 every day.
[0068] Exemplarily, the first server 200 runs a private model, and the second server 200 runs a general large model.
[0069] Next describe Figure 1 The product form of the service distribution terminal 100;
[0070] Figure 2 An optional hardware structure diagram of the service distribution terminal 100 is shown.
[0071] refer to Figure 2 As shown, the service distribution terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), an earphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190 and other components. Those skilled in the art will appreciate that Figure 2 It is only an example of a service distribution terminal and does not constitute a limitation on the service distribution terminal. It may include more or less components than shown in the figure, or a combination of certain components, or different components.
[0072] The input unit 130 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the service distribution terminal. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect the user's touch operations on or near it (such as the user's operation on or near the touch screen using any suitable object such as fingers, joints, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch screen can detect the user's touch action on the touch screen, convert the touch action into a touch signal and send it to the processor 170, and can receive and execute the command sent by the processor 170; the touch signal at least includes the contact point coordinate information. The touch screen 131 can provide an input interface and an output interface between the service distribution terminal 100 and the user. In addition, the touch screen can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.
[0073] Among them, the input device 132 can receive input data and the like.
[0074] The display unit 140 can be used to display information input by the user or provided to the user, various menus of the service distribution terminal 100, interactive interfaces, file display and / or playback of any multimedia file. In the embodiment of the present application, the display unit 140 can be used to display interfaces, processing results, etc.
[0075] The memory 120 can be used to store instructions and data. The memory 120 can mainly include an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files, texts, etc.; the instruction storage area can store software units such as operating systems, applications, instructions required for at least one function, or their subsets and extensions. It can also include a non-volatile random access memory; provide the processor 170 with hardware, software and data resources including management of computing and processing equipment, and support control software and applications. It is also used for the storage of multimedia files, and the storage of running programs and applications.
[0076] The processor 170 is the control center of the service distribution terminal 100. It uses various interfaces and lines to connect various parts of the entire service distribution terminal 100. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it executes various functions of the service distribution terminal 100 and processes data, thereby controlling the service distribution terminal as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 170. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on independent chips. The processor 170 may also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that each functional module therein performs corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.
[0077] The memory 120 may be used to store software codes related to the business data allocation method, the processor 170 may execute the steps of the business data allocation method, and may also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to implement corresponding functions.
[0078] The radio frequency unit 110 (optional) can be used for receiving and sending information or receiving and sending signals during a call, for example, after receiving the downlink information of the base station, it is sent to the processor 170 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0079] In this embodiment of the present application, the RF unit 110 can send data to the server 200 and receive processing results sent by the server 200.
[0080] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.
[0081] The service distribution terminal 100 also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0082] The service distribution terminal 100 also includes an external interface 180, which can be a standard Micro USB interface or a multi-pin connector, which can be used to connect the service distribution terminal 100 to communicate with other devices, and can also be used to connect a charger to charge the service distribution terminal 100.
[0083] Although not shown, the service distribution terminal 100 may also include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which will not be described in detail here. Some or all of the methods described below can be applied to Figure 2 In the business distribution terminal 100 shown.
[0084] Next describe Figure 1 The product form of the server such as the first server or the second server;
[0085] Figure 3 A schematic diagram of the structure of a server is provided, such as Figure 3 As shown, the server includes a bus 201, a processor 202, a communication interface 203 and a memory 204. The processor 202, the memory 204 and the communication interface 203 communicate with each other via the bus 201.
[0086] The bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0087] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0088] The memory 204 may include a volatile memory, such as a random access memory (RAM). The memory 204 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0089] It should be understood that the above-mentioned business distribution terminal 100 and server can be centralized or distributed devices, and the processors in the above-mentioned business distribution terminal 100 and server (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.
[0090] Reference Figure 4 , Figure 4 A flow chart of a method for allocating service data provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, a service data allocation method provided in an embodiment of the present application may include steps S401 to S406, and these steps are described in detail below.
[0091] Step S401: Acquire multiple business data to be processed.
[0092] It is understandable that the business data is different in different application scenarios, which is explained below with examples.
[0093] In sales application scenarios, business data may include: sales data (such as product sales volume, sales revenue, sales regional distribution, etc.), inventory data (such as inventory level, inventory turnover rate, out-of-stock situation, etc.) and price information (such as product pricing, discount policies, promotional activities, etc.).
[0094] In service application scenarios, business data may include: service records (such as service requests, service completion time, service satisfaction, etc.), service processes (service steps, service standards, service efficiency, etc.), service issues (such as problem solving records, common problems, solutions, etc.).
[0095] In R&D application scenarios, business data may include: R&D project information (such as project progress, R&D costs, technical documents, etc.), patent information (such as the number of patent applications, the number of patent authorizations, patent usage, etc.).
[0096] In network security application scenarios, business data may include: system logs (such as user logins, system errors, security events, etc.), network security (such as intrusion detection, virus protection, data leakage, etc.), and IT infrastructure (such as server usage, network traffic, software updates, etc.).
[0097] In the customer recommendation application scenario, business data may include: basic customer information (such as name, gender, age, contact information, etc.), transaction records (such as purchase history, consumption habits, payment methods, etc.), customer feedback (such as service evaluation, product feedback, complaint records, etc.).
[0098] In customer service application scenarios, business data may include access requests sent by users.
[0099] Step S402: Obtain a first accuracy rate of the private model and a second accuracy rate of the general large model.
[0100] The private model is trained by taking the business data input into the general large model as input and the prediction result output by the general large model as the training target.
[0101] It is understandable that both private models and general large models are artificial intelligence models. The accuracy of an artificial intelligence model refers to the ratio of the number of correctly predicted business data to the total number of all predicted business data.
[0102] Step S403: searching for a target business allocation ratio corresponding to the first accuracy rate and the second accuracy rate from the preset correspondence between the accuracy rate of the private model, the accuracy rate of the general large model and the business allocation ratio.
[0103] It can be understood that the greater the ratio of the accuracy of the private model to the accuracy of the general large model, the greater the business allocation ratio; conversely, the smaller the ratio of the accuracy of the private model to the accuracy of the general large model, the smaller the business allocation ratio.
[0104] The following is an explanation of the process of obtaining the corresponding relationship between the accuracy of the private model, the accuracy of the general large model and the business allocation ratio. The process includes the following steps A1 to A3.
[0105] Step A1: If the accuracy of the private model is lower than or equal to a first value, determine that the service allocation ratio is 0.
[0106] Exemplarily, the first value may be determined based on actual conditions and is not limited here.
[0107] It is understandable that if the accuracy of the private model is lower than or equal to the first value, it means that the accuracy of the private model is low, and the accuracy of the prediction result of the business data obtained by the private model is relatively low. Therefore, the prediction result of the business data cannot be obtained through the private model.
[0108] Step A2: If the accuracy of the private model is higher than the first value and lower than the accuracy of the general large model, determine the business allocation ratio from a value greater than 0 and less than 1.
[0109] It is understandable that when the accuracy of the private model is higher than the first value but lower than the accuracy of the general large model, it means that the prediction results of the business data can be obtained through the private model, but the number cannot be too large. The prediction results of a large amount of business data still need to be obtained through the general large model.
[0110] Exemplarily, if the first value is 80%, if the accuracy of the private model is and the accuracy of the general large model is 95%, the business allocation ratio is 2:8; if the accuracy of the private model is 90% and the accuracy of the general large model is 95%, the business allocation ratio is 4:6.
[0111] Step A3: If the accuracy of the private model is higher than or equal to the accuracy of the general large model, determine the business allocation ratio from values greater than or equal to 1.
[0112] For example, if the accuracy of the general large model is 95% and the accuracy of the private model is 96%, the business allocation ratio may be 9:1.
[0113] Exemplarily, the selection of the service allocation ratio in the above steps A2 and A3 may be manually selected based on experience.
[0114] It is understandable that, over time, through continuous data training and model optimization, the accuracy of the private model can be continuously improved, and even gradually approach or exceed the accuracy of the general large model. In summary, the accuracy of the private model and the accuracy of the general large model are constantly changing, so the target business allocation ratio obtained over time may be different. For example, as time goes by, the accuracy of the private model will become higher and higher, so the target business allocation ratio will become larger and larger.
[0115] Step S404: Divide the multiple business data into a first business set and a second business set according to the target business allocation ratio, the first business set including the product of the number of the multiple business data and the target business allocation ratio, and the second business set including the business data among the multiple business data except the first business set.
[0116] Assuming that the number of the plurality of business data is 100,000 and the target business allocation ratio is 8:2, the first business set includes 80,000 business data and the second business set includes 20,000 business data.
[0117] Step S405: input the first business set into the private model, and obtain prediction results of the business data included in the first business set through the private model.
[0118] Step S406: input the second business set into the general large model, and obtain the prediction result of the business data included in the second business set through the general large model.
[0119] It is understandable that this application reduces the reliance on external expensive resources by gradually replacing the general large model with a private model, thereby reducing operating costs. The business data is automatically diverted through steps S403 and S404, which reduces the need for manual intervention and improves the efficiency of model effect verification and business processing.
[0120] Exemplarily, the prediction result of the business data included in the first business set obtained by the private model and the prediction result of the business data included in the second business set obtained by the general large model can be fed back to the client device 400.
[0121] The embodiment of the present application provides a business data allocation method. When allocating business data, the business data is allocated based on the accuracy of the private model and the general large model; first, the target business allocation ratio of the private model and the general large model is determined; thereby, multiple business data can be divided based on the target business allocation ratio to obtain a first business set and a second business set; the first business set is input into the private model, and the prediction results of the business data included in the first business set are obtained through the private model; the second business set is input into the general large model, and the prediction results of the business data included in the second business set are obtained through the general large model. The present application reduces dependence on external expensive resources by gradually replacing the general large model with a private model, thereby reducing operating costs and supply chain risks.
[0122] The following is an explanation of a method for training a private model, which includes the following steps B1 to B6 during implementation.
[0123] Step B1: Determine that the business data input to the general large model is sample business data and determine that the prediction result output by the general large model is a labeled result.
[0124] It is understandable that the general large model is a model that has been trained, so the prediction results output by the general large model are considered accurate, so it can be used as the labeling result of the sample business data without manual labeling.
[0125] Step B2: Using the sample business data as input and the annotation results as training targets, the private model is trained.
[0126] In one possible implementation, the process of training the private model involves at least one of the techniques in machine learning, such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and method-based learning.
[0127] Exemplarily, the private model may be any one of a neural network model, a logistic regression model, a linear regression model, a support vector machine (SVM), an Adaboost, an XGboost, and a Transformer-Encoder model.
[0128] Exemplarily, the neural network model can be any one of a recurrent neural network-based model, a convolutional neural network-based model, and a Transformer-encoder-based classification model.
[0129] Exemplarily, the private model may be a deep hybrid model of a recurrent neural network-based model, a convolutional neural network-based model, and a Transformer-encoder-based classification model.
[0130] Exemplarily, the private model may be any one of an attention-based deep model, a memory network-based deep model, and a deep learning-based short text classification model.
[0131] The short text classification model based on deep learning is a recurrent neural network (RNN) or a convolutional neural network (CNN) or a variant based on a recurrent neural network or a convolutional neural network.
[0132] For example, some simple domain adaptation can be performed on the pre-trained model to obtain a private model.
[0133] Exemplarily, “simple domain adaptation” includes but is not limited to re-pre-training an already pre-trained model using large-scale unsupervised domain corpus, and / or compressing an already pre-trained model by model distillation.
[0134] Step B3: input the acquired business data into the general large model and the private model respectively, obtain a first prediction result through the general large model and obtain a second prediction result through the private model.
[0135] Step B4: input the business data, the first prediction result and the second prediction result into a pre-built referee model, and obtain the accuracy of the private model and the accuracy of the general large model through the referee model.
[0136] The referee model is trained by taking sample business data, the prediction results of the general large model and the prediction results of the private model as inputs, and taking the labeling accuracy of the general large model and the labeling accuracy of the private model as training targets.
[0137] Exemplarily, the annotation accuracy of the general large model may be published by a large technology company or a professional artificial intelligence laboratory that develops the general large model.
[0138] Exemplarily, the labeling accuracy of the private model = the number of correctly predicted business data / the total number of all predicted business data.
[0139] Step B5: If the accuracy of the private model is less than a second value, return to step B1; the second value is the difference between the accuracy of the universal large model and a preset value.
[0140] Exemplarily, the preset value may be determined based on actual conditions, which is not limited here. For example, the preset value may be 0.
[0141] Exemplarily, the preset value may be any value greater than or equal to 0.
[0142] It is understandable that if the accuracy of the private model is less than the second value, it is necessary to continue training the private model, ie, return to step B1. The sample business data used in different iterations of training the private model are different.
[0143] Step B6: If the accuracy of the private model is equal to or higher than the second value, the trained private model is obtained.
[0144] It is understandable that if the accuracy of the private model is equal to or higher than the accuracy of the general large model, the prediction results of all business data can be obtained by the private model. However, the general large model is developed by a large technology company or a professional artificial intelligence laboratory. As time goes by, the general large model is constantly updated, and the accuracy of the general large model is constantly improving. With the passage of time and the development of technology, the private model may become outdated and unable to keep up with the latest business needs and market changes. In the process of using the private model in this application, the business data may all belong to the same application scenario. As a result, the private model performs well for the business data of the application scenario, but does not necessarily have a wide range of generalization capabilities. Based on this, the embodiment of the present application also provides the following method, which includes the following steps C1 to C4 during implementation.
[0145] Step C1: acquiring a preset number of detection service data from the acquired multiple service data at intervals of a preset duration.
[0146] For example, the preset duration may be determined based on actual conditions, and this application does not limit this. For example, the preset duration may be 7 days or 30 days.
[0147] Exemplarily, the preset number may be determined based on actual conditions, and this application does not limit this.
[0148] In the embodiment of the present application, the business data used to be input into the general large model is referred to as detection business data.
[0149] Step C2: inputting the detection business data into the general large model and the private model respectively, obtaining a third prediction result through the general large model and obtaining a fourth prediction result through the private model.
[0150] Step C3: inputting the detection service data, the third prediction result and the fourth prediction result into the referee model, and obtaining the accuracy of the private model and the accuracy of the general large model through the referee model.
[0151] Step C4: If the accuracy of the private model is lower than the second value, return to step B1.
[0152] It is understandable that if the accuracy of the private model is lower than the second value, the private model continues to be trained.
[0153] Exemplarily, it also includes: if the accuracy of the private model is higher than or equal to the second value and lower than the accuracy of the general large model, the private model is trained using the detection business data as input and the prediction result of the detection business data output by the general large model as a training target.
[0154] In summary, by comparing the private model with the general large model at preset intervals, the limitations of the private model can be discovered in a timely manner, and necessary updates and optimizations can be made.
[0155] A service data allocation method provided in an embodiment of the present application is introduced above, and a device for executing the service data allocation method is introduced below.
[0156] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of a service data distribution device provided in an embodiment of the present application. Figure 5 As shown, the service data distribution device includes:
[0157] A first acquisition module 501 is used to acquire a plurality of business data to be processed;
[0158] A second acquisition module 502 is used to acquire a first accuracy rate of the private model and a second accuracy rate of the general large model;
[0159] The private model is obtained by training using the business data input to the general large model as input and the prediction result output by the general large model as the training target;
[0160] A search module 503 is used to search for a target business allocation ratio corresponding to the first accuracy rate and the second accuracy rate from a preset correspondence relationship between the accuracy rate of the private model, the accuracy rate of the general large model and the business allocation ratio;
[0161] A division module 504 is used to divide the multiple business data into a first business set and a second business set according to the target business allocation ratio, wherein the first business set includes the business data that is the product of the number of the multiple business data and the target business allocation ratio; and the second business set includes the business data in the multiple business data except the first business set;
[0162] A third acquisition module 505, configured to input the first service set into the private model, and obtain prediction results of the service data included in the first service set through the private model;
[0163] The fourth acquisition module 506 is used to input the second business set into the general large model, and obtain the prediction result of the business data included in the second business set through the general large model.
[0164] In an optional implementation, the method further includes:
[0165] A first determination module, configured to determine that the service allocation ratio is 0 if the accuracy of the private model is lower than or equal to a first value;
[0166] A second determination module, configured to determine the service allocation ratio from a value greater than 0 and less than 1 if the accuracy of the private model is higher than the first value and lower than the accuracy of the general large model;
[0167] The third determination module is used to determine the business allocation ratio from a value greater than or equal to 1 if the accuracy of the private model is higher than or equal to the accuracy of the general large model.
[0168] In an optional implementation, the method further includes:
[0169] A fourth determination module, used to determine that the business data input to the general large model is sample business data and to determine that the prediction result output by the general large model is a labeled result;
[0170] A training module, used to train the private model by taking the sample business data as input and the annotation result as a training target;
[0171] A fifth acquisition module, used to input the acquired business data into the general large model and the private model respectively, obtain a first prediction result through the general large model and obtain a second prediction result through the private model;
[0172] a sixth acquisition module, configured to input the business data, the first prediction result, and the second prediction result into a pre-built referee model, and obtain the accuracy of the private model and the accuracy of the general large model through the referee model;
[0173] The referee model is obtained by training with sample business data, the prediction results of the general large model and the prediction results of the private model as inputs, and with the labeling accuracy of the general large model and the labeling accuracy of the private model as training targets;
[0174] A first triggering module, configured to trigger the fourth determining module if the accuracy of the private model is less than a second value, wherein the second value is a difference between the accuracy of the general large model and a preset value;
[0175] The seventh acquisition module is used to acquire the trained private model if the accuracy of the private model is equal to or higher than the second value.
[0176] In an optional implementation, the method further includes:
[0177] An eighth acquisition module, configured to acquire a preset number of detection service data from the acquired multiple service data at intervals of a preset duration;
[0178] a ninth acquisition module, configured to input the detection service data into the general large model and the private model respectively, obtain a third prediction result through the general large model, and obtain a fourth prediction result through the private model;
[0179] a tenth acquisition module, configured to input the detection service data, the third prediction result, and the fourth prediction result into the referee model, and acquire the accuracy of the private model and the accuracy of the general large model through the referee model;
[0180] The second triggering module is used to trigger the fourth determining module if the accuracy of the private model is lower than the second value.
[0181] The present application also provides an electronic device in an embodiment. Figure 6As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0182] like Figure 6 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0183] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0184] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any one of the service data distribution methods provided in the embodiments of the present application.
[0185] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any business data distribution method provided in an embodiment of the present application.
[0186] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0187] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0188] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0189] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A method for allocating business data, characterized in that: include: Obtain multiple business data to be processed; Obtain a first accuracy rate of the private model and a second accuracy rate of the general large model; The private model is obtained by training using the business data input to the general large model as input and the prediction result output by the general large model as the training target; From the preset correspondence between the accuracy of the private model, the accuracy of the general large model and the business allocation ratio, searching for the target business allocation ratio corresponding to the first accuracy and the second accuracy; Dividing the multiple service data into a first service set and a second service set according to the target service allocation ratio, the first service set including the service data that is the product of the number of the multiple service data and the target service allocation ratio; the second service set including the service data among the multiple service data except the first service set; Inputting the first service set into the private model, and obtaining prediction results of the service data included in the first service set through the private model; The second business set is input into the general large model, and the prediction result of the business data included in the second business set is obtained through the general large model.
2. The service data distribution method according to claim 1, characterized in that: The method for obtaining the corresponding relationship between the accuracy of the private model, the accuracy of the general large model and the business allocation ratio includes: If the accuracy of the private model is lower than or equal to the first value, determining that the service allocation ratio is 0; If the accuracy of the private model is higher than the first value and lower than the accuracy of the general large model, determine the business allocation ratio from a value greater than 0 and less than 1; If the accuracy of the private model is higher than or equal to the accuracy of the general large model, the business allocation ratio is determined from a value greater than or equal to 1.
3. The service data distribution method according to any one of claims 1 or 2, characterized in that: The training method of the private model includes: Determining the business data input to the general large model as sample business data and determining the prediction result output by the general large model as the labeled result; Using the sample business data as input and the annotation result as a training target, training the private model; Inputting the acquired business data into the general large model and the private model respectively, obtaining a first prediction result through the general large model and obtaining a second prediction result through the private model; Inputting the business data, the first prediction result, and the second prediction result into a pre-built referee model, and obtaining the accuracy of the private model and the accuracy of the general large model through the referee model; The referee model is obtained by training with sample business data, the prediction results of the general large model and the prediction results of the private model as inputs, and with the labeling accuracy of the general large model and the labeling accuracy of the private model as training targets; If the accuracy of the private model is less than a second value, returning to the step of determining that the business data input to the general large model is sample business data and determining that the prediction result output by the general large model is a labeled result; the second value is the difference between the accuracy of the general large model and a preset value; If the accuracy of the private model is equal to or higher than the second value, the trained private model is obtained.
4. The service data distribution method according to claim 3, characterized in that: After the step of obtaining the trained private model, the method further includes: At each preset time interval, a preset number of detection service data are obtained from the obtained multiple service data; Inputting the detection service data into the general large model and the private model respectively, obtaining a third prediction result through the general large model and obtaining a fourth prediction result through the private model; Inputting the detection service data, the third prediction result and the fourth prediction result into the referee model, and obtaining the accuracy of the private model and the accuracy of the general large model through the referee model; If the accuracy of the private model is lower than the second value, return to the step of determining that the business data input to the general large model is sample business data and determining that the prediction result output by the general large model is the labeled result.
5. The service data distribution method according to claim 4, characterized in that: Also includes: If the accuracy of the private model is higher than or equal to the second value and lower than the accuracy of the general large model, the private model is trained using the detection business data as input and the prediction result of the detection business data output by the general large model as a training target.
6. A service data distribution device, characterized in that: include: A first acquisition module, used to acquire a plurality of business data to be processed; A second acquisition module, used to acquire a first accuracy rate of the private model and a second accuracy rate of the general large model; The private model is obtained by training using the business data input to the general large model as input and the prediction result output by the general large model as the training target; A search module, used for searching the target business allocation ratio corresponding to the first accuracy rate and the second accuracy rate from the preset correspondence between the accuracy rate of the private model, the accuracy rate of the general large model and the business allocation ratio; a division module, configured to divide the plurality of service data into a first service set and a second service set according to the target service allocation ratio, wherein the first service set includes service data that is a product of the number of the plurality of service data and the target service allocation ratio; and the second service set includes service data in the plurality of service data except the first service set; A third acquisition module, configured to input the first service set into the private model, and obtain a prediction result of the service data included in the first service set through the private model; The fourth acquisition module is used to input the second business set into the general large model, and obtain the prediction result of the business data included in the second business set through the general large model.
7. The service data distribution device according to claim 6, characterized in that: Also includes: A first determination module, configured to determine that the service allocation ratio is 0 if the accuracy of the private model is lower than or equal to a first value; A second determination module, configured to determine the service allocation ratio from a value greater than 0 and less than 1 if the accuracy of the private model is higher than the first value and lower than the accuracy of the general large model; The third determination module is used to determine the business allocation ratio from a value greater than or equal to 1 if the accuracy of the private model is higher than or equal to the accuracy of the general large model.
8. A computer program product, characterized in that It comprises computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the service data distribution method as claimed in any one of claims 1 to 5.
9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the service data distribution method as described in any one of claims 1 to 5.
10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the service data distribution method as described in any one of claims 1 to 5.