A method, device, electronic device and storage medium for generating service results
By finding and parsing general model files and generating service results corresponding to service requests, the problem of model engineering relies on a large amount of human resources and low efficiency in the existing technology is solved, and efficient service model engineering is achieved.
Patent Information
- Application Number
- CN202011018058.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-24
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2040-09-24
AI Technical Summary
In the prior art, model engineering relies on a large amount of human resources, consumes a lot of time and resources, and is inefficient.
By finding a general model file matching the service request, the service model obtained by parsing the general model file, the service results corresponding to the service request are generated, and the efficiency of the service model engineering is improved.
It realizes efficiently obtaining general model files matching service requests, generating service results corresponding to service requests, and improving the efficiency of model engineering.
Smart Images

Figure CN112084417B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer information technology, and in particular to a method, device, electronic device and storage medium for generating service results. Background Art
[0002] At present, machine learning can be used to develop a variety of models suitable for different industries and different service scenarios, such as models for recommending clothes to users on shopping platforms.
[0003] In practice, a machine learning framework is usually used to develop models in a development environment to generate corresponding model files. In the process of model engineering, for each model, staff need to develop an interpreter that matches the machine learning framework of the model, and then use the developed interpreter to convert the static model files into specific services that can be used online.
[0004] However, this model engineering approach relies on a large number of staff, consumes a lot of human and time resources, and has low efficiency in model engineering. Summary of the invention
[0005] In view of this, the purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for generating service results, which can obtain a general model file matching the service request, generate a service result corresponding to the service request based on the service model parsed from the general model file, and have high efficiency in service model engineering.
[0006] In a first aspect, an embodiment of the present application provides a method for generating a service result, the generating method comprising:
[0007] Responding to a service request sent by a user through a service request end, searching for a general model file matching the service request;
[0008] Based on the file category to which the general model file belongs, converting the input information carried by the service request into standard input information that satisfies the input format corresponding to the file category;
[0009] The general model file is parsed to obtain a service model corresponding to the general model file, the standard input information is input into the service model, a service result output by the service model is obtained, and the service result is sent to the service request end.
[0010] In a possible implementation, the general model file is generated in the following manner:
[0011] Train the initial service model based on the machine learning framework to obtain a trained service model;
[0012] Selecting a target general model framework that matches the target processing efficiency and target processing accuracy of the service model from a plurality of preset general model frameworks;
[0013] The machine learning framework of the service model is converted into the target general model framework, and a general model file corresponding to the service model is generated.
[0014] In a possible implementation, based on the file category to which the general model file belongs, converting the input information carried by the service request into standard input information that satisfies the input format corresponding to the file category includes:
[0015] Convert each of the input information into a structured expression that matches the file category to which the general model file belongs;
[0016] Based on a sorting rule that matches the file category to which the general model file belongs, the structured expression rows corresponding to each input information are sorted to obtain the standard input information.
[0017] In a possible implementation, parsing the general model file to obtain a service model corresponding to the general model file, inputting the standard input information into the service model, and obtaining a service result output by the service model includes:
[0018] According to the file category to which the general model file belongs and the file name of the general model file, searching for the target interface corresponding to the general model file;
[0019] Parsing the general model file based on the target interface to obtain a service model corresponding to the general model file;
[0020] The standard input information is input into the service model through the target interface, and the service result output by the service model is obtained.
[0021] In a second aspect, an embodiment of the present application provides a device for generating a service result, the device comprising:
[0022] A search module, used to respond to a service request sent by a user through a service request end, and search for a general model file matching the service request;
[0023] A conversion module, configured to convert the input information carried by the service request into standard input information satisfying an input format corresponding to the file category based on the file category to which the general model file belongs;
[0024] An acquisition module, used to parse the general model file, obtain the service model corresponding to the general model file, input the standard input information into the service model, and obtain the service result output by the service model;
[0025] A sending module is used to send the service result to the service request end.
[0026] In a possible implementation manner, the generating device further includes:
[0027] The training module is used to train the initial service model based on the machine learning framework to obtain a trained service model;
[0028] A selection module, used to select a target general model framework that matches the target processing efficiency and target processing accuracy of the service model from a plurality of preset general model frameworks;
[0029] A generation module is used to convert the machine learning framework of the service model into the target general model framework and generate a general model file corresponding to the service model.
[0030] In a possible implementation, the conversion module, when converting the input information carried by the service request into standard input information satisfying an input format corresponding to the file category based on the file category to which the general model file belongs, includes:
[0031] Convert each of the input information into a structured expression that matches the file category to which the general model file belongs;
[0032] Based on a sorting rule that matches the file category to which the general model file belongs, the structured expression rows corresponding to each input information are sorted to obtain the standard input information.
[0033] In a possible implementation, the acquisition module, when parsing the general model file to obtain the service model corresponding to the general model file, inputting the standard input information into the service model, and obtaining the service result output by the service model, includes:
[0034] According to the file category to which the general model file belongs and the file name of the general model file, searching for the target interface corresponding to the general model file;
[0035] Parsing the general model file based on the target interface to obtain a service model corresponding to the general model file;
[0036] The standard input information is input into the service model through the target interface, and the service result output by the service model is obtained.
[0037] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to perform the steps of the service result generation method described in any one of the first aspects.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for generating a service result described in any one of the first aspects are executed.
[0039] The embodiments of the present application provide a method, device, electronic device, and storage medium for generating a service result. In response to a service request sent by a user through a service request end, a general model file matching the service request is searched; based on the file category to which the general model file belongs, the input information carried by the service request is converted into standard input information that satisfies the input format corresponding to the file category; the general model file is parsed to obtain a service model corresponding to the general model file, the standard input information is input into the service model, the service result output by the service model is obtained, and the service result is sent to the service request end. The embodiments of the present application can obtain a general model file matching the service request, generate a service result corresponding to the service request based on the service model obtained by parsing the general model file, and the efficiency of service model engineering is high.
[0040] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 A flow chart showing a method for generating a service result provided in an embodiment of the present application is shown;
[0043] Figure 2 A flowchart showing another method for generating service results provided by an embodiment of the present application is shown;
[0044] Figure 3A flowchart showing another method for generating service results provided by an embodiment of the present application is shown;
[0045] Figure 4 A flowchart showing another method for generating service results provided by an embodiment of the present application is shown;
[0046] Figure 5 A schematic diagram showing the structure of a device for generating service results provided in an embodiment of the present application is shown;
[0047] Figure 6 A schematic diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0048] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0049] At present, machine learning can be used to develop a variety of models suitable for different industries and service scenarios, such as models that recommend clothes to users on shopping platforms. In practice, a machine learning framework is usually used to develop models in a development environment to generate corresponding model files. In the process of model engineering, for each model, the staff needs to develop a set of interpreters that match the machine learning framework of the model, and then use the developed interpreters to convert static model files into specific services that can be used online. However, this model engineering method relies on a large number of staff, consumes a lot of human resources and time resources, and has low efficiency in model engineering.
[0050] Based on the above problems, the embodiments of the present application provide a method, device, electronic device and storage medium for generating service results, which respond to the service request sent by the user through the service request end, search for a general model file that matches the service request; based on the file category to which the general model file belongs, convert the input information carried by the service request into standard input information that satisfies the input format corresponding to the file category; parse the general model file to obtain the service model corresponding to the general model file, input the standard input information into the service model, obtain the service result output by the service model, and send the service result to the service request end. The embodiments of the present application can obtain a general model file that matches the service request, generate a service result corresponding to the service request based on the service model obtained by parsing the general model file, and the efficiency of service model engineering is high.
[0051] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the process of discovering the above problems and the solutions proposed by this application for the above problems below should be the contributions made by the inventor to this application during the application process.
[0052] The technical solutions in the present application will be clearly and completely described below in conjunction with the drawings in the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0053] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0054] To facilitate understanding of this embodiment, a method for generating a service result disclosed in the embodiment of the present application is first introduced in detail. The execution subject of the method for generating a service result provided in the embodiment of the present application can be a server or an automatic interpretation service. The following describes the method for generating a service result provided in the embodiment of the present application with the execution subject being the automatic interpretation service.
[0055] See also Figure 1 As shown, Figure 1 A flowchart of a method for generating a service result provided in an embodiment of the present application, the method comprising the following steps:
[0056] S101. Respond to a service request sent by a user through a service request end, and search for a general model file matching the service request.
[0057] In the embodiment of the present application, the automatic interpretation service corresponds to an API interface (Application Program Interface), and the service request end is a carrier for users to send service requests, such as computer websites or mobile applications such as Taobao, Baidu, and JD. Based on the user operations on the service request end, the service request end generates a service request corresponding to the above user operations, and sends the generated service request to the automatic interpretation service through the API interface. The above service request carries multiple input information.
[0058] For example, when the target user is using Taobao, he updates the Taobao page (user operation of item recommendation), and Taobao generates a service request for item recommendation that matches the user operation of item recommendation, wherein the service request for item recommendation carries the user attribute information and historical browsing information of the target user (input information of item recommendation). Taobao sends the service request for item recommendation to the automatic interpretation service through the API interface, so that the automatic interpretation service generates a service result of item recommendation corresponding to the service request for item recommendation based on the input information of item recommendation, and returns the generated service result of item recommendation to Taobao.
[0059] The automatic interpretation service has multiple general model files pre-stored locally. Different general model files can be parsed to obtain different service models. Different service models provide different services to users. The automatic interpretation service has the correspondence between service requests and general model files pre-stored locally. For example, the first type of service request corresponds to general model file 1, and the second type of service request corresponds to general model file 2. Based on the above correspondence, the general model file that matches the received service request is searched.
[0060] S102: Based on the file category to which the general model file belongs, convert the input information carried in the service request into standard input information that satisfies an input format corresponding to the file category.
[0061] In an embodiment of the present application, in order to ensure that the service model can accurately process the information input into the service model, it is usually necessary to limit the input format of the information input into the service model, that is, to ensure that the information input into the service model is standard input information that conforms to the input format of the service model. For example, the input information is 1, 2, 3, 4, 5, 6, and the input format corresponding to service model 1 is a matrix with two rows and three columns. Then the standard input information corresponding to service model 1 is a matrix 1 with two rows and three columns, and the first row of matrix 1 is 1, 2, 3, and the second row is 4, 5, 6. The input format corresponding to service model 2 is a matrix with three rows and two columns. Then the standard input information corresponding to service model 2 is a matrix 2 with three rows and two columns, and the first row of matrix 2 is 1, 2, the second row is 3, 4, and the third row is 5, 6.
[0062] Different service models correspond to different input formats, that is, different general model files correspond to different input formats. According to the file type of the general model file found, the input format corresponding to the general model file is obtained, and the input information carried by the service request is converted into standard input information that satisfies the above input format.
[0063] S103: Parse the general model file to obtain a service model corresponding to the general model file, input the standard input information into the service model, obtain a service result output by the service model, and send the service result to the service request end.
[0064] In an embodiment of the present application, the found general model file is parsed to obtain the corresponding service model, the converted standard input information is input into the service model, the service result output by the service model is obtained, and the obtained service result is returned to the corresponding service request end through the API interface of the automatic interpretation service.
[0065] It should be noted that the service results generated by the service model are in a structured expression form, such as 0101, 1001, etc. The service request end pre-stores the correspondence between the structured expression form and the unstructured expression form of the service results. For example, 0101 corresponds to a T-shirt, and 1001 corresponds to a pair of pants. Based on the above correspondence, the service request end converts the service results in the structured expression form into the service results in the unstructured expression form, and then displays the service results in the unstructured expression form to the user.
[0066] It should be noted that the service model is obtained by parsing the general model file, and the framework corresponding to the service model is the general model framework.
[0067] In an embodiment of the present application, multiple automatic interpretation services can also be arranged. When a user sends multiple service requests through the service request end, the above-mentioned multiple service requests are evenly distributed to the above-mentioned multiple automatic interpretation services, and multiple automatic interpretation services are used to process multiple service requests at the same time, thereby improving the response speed of service requests. In addition, when an automatic interpretation service fails, other automatic interpretation services that can work normally can be used to respond to service requests, and the stability is high.
[0068] The method for generating service results provided in the embodiment of the present application has multiple general model files pre-stored in the automatic interpretation service. After receiving a service request, the general model file matching the service request is obtained, and the service model obtained by parsing the general model file is used to generate a service result corresponding to the service request. Based on the automatic interpretation service, multiple different service models are engineered to improve the efficiency of service model engineering.
[0069] For further information, see Figure 2 As shown, in the method for generating the service result provided in the embodiment of the present application, the general model file is generated in the following manner:
[0070] S201. Train the initial service model based on a machine learning framework to obtain a trained service model.
[0071] In the embodiment of the present application, when training the service model, the initialized service model (initial service model) is placed in the machine learning framework corresponding to the initial service model to complete the model training and obtain the trained service model. There are many types of machine learning frameworks, such as Pytorch, TensorFlow, etc. The automatic interpretation service provides users with various types of services, and the service models used correspond to a variety of machine learning frameworks.
[0072] In practice, the development environment for machine learning models is mainly Notebook, which mainly supports Python. In the process of building the development environment, it is necessary to support multiple existing machine learning frameworks so that different machine learning models can be trained in the corresponding machine learning frameworks. Support for multiple machine learning frameworks can be achieved by adding the Notebook Kernel underlying library.
[0073] S202. Selecting a target general model framework that matches the target processing efficiency and target processing accuracy of the service model from a plurality of preset general model frameworks.
[0074] In an embodiment of the present application, for each machine learning framework, the machine learning framework can be converted into any general model framework. Theoretically, the machine learning frameworks corresponding to the multiple service models deployed in the automatic interpretation service can be converted into the same general model framework. The input format of the input information of the multiple service models corresponding to the same general model framework is the same, which will reduce the processing steps for selecting the input format and improve the efficiency of responding to service requests. However, different general model frameworks have different corresponding processing efficiencies or different corresponding processing accuracy. Taking into account the actual processing efficiency and actual processing accuracy of the service model (target processing efficiency and target processing accuracy), for each service model, a target general model framework that matches the target processing efficiency and target processing accuracy of the service model is selected from multiple general model frameworks.
[0075] S203: Convert the machine learning framework of the service model into the target general model framework, and generate a general model file corresponding to the service model.
[0076] In an embodiment of the present application, for each service model, after determining the target general model framework corresponding to the service model, the machine learning framework of the service model is converted into the corresponding target general model framework to generate a general model file corresponding to the service model.
[0077] For further information, see Figure 3 As shown, in the method for generating a service result provided in an embodiment of the present application, based on the file category to which the general model file belongs, converting the input information carried by the service request into standard input information that satisfies the input format corresponding to the file category includes:
[0078] S301: Convert each of the input information into a structured expression that matches the file category to which the general model file belongs.
[0079] In the embodiment of the present application, since the input information is unstructured, it is first necessary to convert the unstructured input information into structured input information, and then adjust the format of the structured input information to obtain a corresponding structured expression.
[0080] Specifically, based on the correspondence between unstructured information and structured information that matches the file category to which the general model file belongs, the structured input information corresponding to the unstructured input information is determined, and based on the format requirements that match the file category to which the general model file belongs, the structured input information is adjusted to a structured expression that meets the above format requirements.
[0081] For example, the input information includes the address information "Chaoyang District, Beijing". First, determine the structured input information "01011100" corresponding to "Chaoyang District, Beijing", and then adjust "01011100" to a target matrix with two rows and four columns according to the format requirements. The first row of the target matrix is "0101" and the second row is "1100", where the target matrix is the structured expression corresponding to the input information.
[0082] S302: Sort the structured expression rows corresponding to each input information based on a sorting rule that matches the file category to which the general model file belongs, to obtain the standard input information.
[0083] In an embodiment of the present application, the service request carries multiple input information. After each input information is converted into a structured expression, each structured expression is sorted according to a sorting rule that matches the file category to which the general model file belongs to obtain standard input information.
[0084] For example, the input information includes input information 1 and input information 2. The structured expression of input information 1 is "010", and the structured expression of input information 2 is "101". The sorting rule is: input information 2 + input information 1, then the standard input information is "101010".
[0085] For further information, see Figure 4 As shown, in the method for generating a service result provided in an embodiment of the present application, the general model file is parsed to obtain a service model corresponding to the general model file, the standard input information is input into the service model, and the service result output by the service model is obtained, including:
[0086] S401. Searching for a target interface corresponding to the general model file according to the file category to which the general model file belongs and the file name of the general model file.
[0087] In an embodiment of the present application, different universal model files correspond to different target interfaces. The file category to which the universal model file belongs is determined based on the suffix of the universal model file. For example, if the suffix of the universal model file is onnx, then the universal model file is a first-category universal model file. If the suffix of the universal model file is pmml, then the universal model file is a second-category universal model file. Based on the suffix and file name of the universal model file, the target interface corresponding to the universal model file is searched. For example, abc.onnx corresponds to target interface 1, and def.pmml corresponds to target interface 2.
[0088] S402: Parse the general model file based on the target interface to obtain a service model corresponding to the general model file.
[0089] In the embodiment of the present application, based on the target interface corresponding to the general model file, the general model file is parsed to obtain the corresponding service model, which is a model that can provide actual services to the outside.
[0090] S403: Input the standard input information into the service model through the target interface, and obtain the service result output by the service model.
[0091] In an embodiment of the present application, standard input information is input into the service model through the target interface of the service model, the service result output by the service model is obtained, and the service result is sent to the automatic interpretation service through the above-mentioned target interface, so that the automatic interpretation service sends the service result to the corresponding service request end.
[0092] Based on the same inventive concept, the embodiment of the present application also provides a device for generating service results corresponding to the method for generating service results. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the method for generating service results in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0093] See also Figure 5 As shown, Figure 5 A schematic diagram of a structure of a device for generating a service result provided in an embodiment of the present application, the device comprising:
[0094] A search module 501 is used to respond to a service request sent by a user through a service request end and search for a general model file matching the service request;
[0095] A conversion module 502, configured to convert the input information carried by the service request into standard input information satisfying an input format corresponding to the file category based on the file category to which the general model file belongs;
[0096] The acquisition module 503 is used to parse the general model file to obtain the service model corresponding to the general model file, input the standard input information into the service model, and obtain the service result output by the service model;
[0097] The sending module 504 is used to send the service result to the service request end.
[0098] In a possible implementation manner, the generating device further includes:
[0099] The training module is used to train the initial service model based on the machine learning framework to obtain a trained service model;
[0100] A selection module, used to select a target general model framework that matches the target processing efficiency and target processing accuracy of the service model from a plurality of preset general model frameworks;
[0101] A generation module is used to convert the machine learning framework of the service model into the target general model framework and generate a general model file corresponding to the service model.
[0102] In a possible implementation, the conversion module 502, when converting the input information carried by the service request into standard input information satisfying the input format corresponding to the file category based on the file category to which the general model file belongs, includes:
[0103] Convert each of the input information into a structured expression that matches the file category to which the general model file belongs;
[0104] Based on a sorting rule that matches the file category to which the general model file belongs, the structured expression rows corresponding to each input information are sorted to obtain the standard input information.
[0105] In a possible implementation, the acquisition module 503, when parsing the general model file to obtain the service model corresponding to the general model file, inputting the standard input information into the service model, and obtaining the service result output by the service model, includes:
[0106] According to the file category to which the general model file belongs and the file name of the general model file, searching for the target interface corresponding to the general model file;
[0107] Parsing the general model file based on the target interface to obtain a service model corresponding to the general model file;
[0108] The standard input information is input into the service model through the target interface, and the service result output by the service model is obtained.
[0109] The service result generation device provided in the embodiment of the present application has multiple general model files pre-stored in the automatic interpretation service. After receiving a service request, the general model file matching the service request is obtained, and the service model obtained by parsing the general model file is used to generate a service result corresponding to the service request. Based on the automatic interpretation service, multiple different service models are engineered to improve the efficiency of service model engineering.
[0110] See also Figure 6 As shown, Figure 6An electronic device 600 is provided for an embodiment of the present application, and the electronic device 600 includes: a processor 601, a memory 602 and a bus, wherein the memory 602 stores machine-readable instructions executable by the processor 601, and when the electronic device is running, the processor 601 communicates with the memory 602 via the bus, and the processor 601 executes the machine-readable instructions to perform the steps of the method for generating service results as described above.
[0111] Specifically, the above-mentioned memory 602 and processor 601 can be general-purpose memory and processor, which are not specifically limited here. When the processor 601 runs the computer program stored in the memory 602, the above-mentioned service result generation method can be executed.
[0112] Corresponding to the above-mentioned method for generating service results, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method for generating service results are executed.
[0113] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0114] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0115] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0116] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that can be executed by a processor. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0117] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for generating a service result, characterized in that: The generation method comprises: Responding to a service request sent by a user through a service request end, searching for a general model file matching the service request; Based on the file category to which the general model file belongs, converting the input information carried by the service request into standard input information that satisfies the input format corresponding to the file category; According to the file category to which the general model file belongs and the file name of the general model file, searching for the target interface corresponding to the general model file; Parsing the general model file based on the target interface to obtain a service model corresponding to the general model file; Input the standard input information into the service model through the target interface, obtain the service result output by the service model, and send the service result to the service request end; The general model file is generated in the following manner: Train the initial service model based on the machine learning framework to obtain a trained service model; Selecting a target general model framework that matches the target processing efficiency and target processing accuracy of the service model from a plurality of preset general model frameworks; The machine learning framework of the service model is converted into the target general model framework, and a general model file corresponding to the service model is generated.
2. The method for generating service results according to claim 1, characterized in that: The converting the input information carried by the service request into standard input information satisfying the input format corresponding to the file category based on the file category to which the general model file belongs includes: Convert each of the input information into a structured expression that matches the file category to which the general model file belongs; Based on a sorting rule that matches the file category to which the general model file belongs, the structured expression rows corresponding to each input information are sorted to obtain the standard input information.
3. A device for generating service results, characterized in that: The generating device comprises: A search module, used to respond to a service request sent by a user through a service request end, and search for a general model file matching the service request; A conversion module, configured to convert the input information carried by the service request into standard input information satisfying an input format corresponding to the file category based on the file category to which the general model file belongs; An acquisition module is used to find a target interface corresponding to the general model file according to the file category to which the general model file belongs and the file name of the general model file; parse the general model file based on the target interface to obtain a service model corresponding to the general model file; input the standard input information into the service model through the target interface, and obtain a service result output by the service model; A sending module, used to send the service result to the service request end; The training module is used to train the initial service model based on the machine learning framework to obtain a trained service model; A selection module, used to select a target general model framework that matches the target processing efficiency and target processing accuracy of the service model from a plurality of preset general model frameworks; A generation module is used to convert the machine learning framework of the service model into the target general model framework and generate a general model file corresponding to the service model.
4. The service result generating device according to claim 3, characterized in that: The conversion module, when converting the input information carried by the service request into standard input information satisfying the input format corresponding to the file category based on the file category to which the general model file belongs, includes: Convert each of the input information into a structured expression that matches the file category to which the general model file belongs; Based on a sorting rule that matches the file category to which the general model file belongs, the structured expression rows corresponding to each input information are sorted to obtain the standard input information.
5. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the method for generating a service result as described in any one of claims 1 to 2.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method for generating a service result as claimed in any one of claims 1 to 2.
Citation Information
Patent Citations
Data recommendation method, a device and a storage medium
CN108989397A
Online prediction method, system and server
CN111062521A
Service generation method, device and equipment and computer readable storage medium
CN111338604A