Combination model configuration method and device
By automatically acquiring and constructing the external interface and routing data of the combined model, in real -time response to dynamic launch and offline requests, the problem of low combination model configuration efficiency in the existing technology has been solved, and the rapid and accurate combination model configuration and reasoning services are realized.
Patent Information
- Application Number
- CN202411221483.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2025-01-28
AI Technical Summary
The relationship between the models in the existing composite model is complex, which leads to frequent adjustment of model node relationships when business needs change. The existing technology relies on manual analysis and updates, which is time-consuming and labor-intensive and prone to errors, resulting in inefficiency.
Provide a combination model configuration method. By obtaining the model combination information, the external interface and routing data of a variety of combined models are constructed, the real -time monitoring dynamic dynamic launch and offline request, automatically load and delete the routing class data, open or close the external interface, and the external interface is turned on. To achieve a fast and efficient combined model configuration.
When the business demand changes, the combination model is quickly and accurately configured, which improves the efficiency and accuracy of reasoning services, reduces the errors of manual intervention, and meets the complex and changeable reasoning needs.
Smart Images

Figure CN119376809A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a method and device for configuring a combination model. Background Art
[0002] Inference service is the process of deploying trained models online for real-time computing and processing. Conventional single models are often optimized for specific tasks and data sets during design and training. When faced with complex and changeable scenarios with diverse data forms, their inference accuracy and efficiency often fall short of expectations. To solve this problem, multiple models can be combined to achieve combination and collaboration between multiple models, fully integrating the advantages of multiple models, improving the inference accuracy and efficiency of the combined model, and at the same time improving the flexibility and adaptability of the overall combined model to meet complex and changeable inference needs.
[0003] However, the relationships between models in existing composite models are complex. To meet different business needs, the models in the composite model need to be connected in different ways. However, as business needs change, the node relationships between the models in the composite model may need to be frequently adjusted and modified. Existing technologies often use manual methods to reparse the entire composite model, update the corresponding code, and reconfigure the files. This process is not only time-consuming and labor-intensive, but also prone to errors, resulting in low efficiency. Therefore, there is an urgent need for a composite model configuration method that can achieve fast and efficient reasoning services for the composite model as business needs change, and provide multiple versions of model combinations that can be called in real time to accurately obtain the expected data processing results. Summary of the Invention
[0004] Given the complex relationships among the models in the existing combined model, in order to meet different business needs, the models in the combined model need to be connected in different ways. However, as business needs change, the node relationships corresponding to the models in the combined model may need to be frequently adjusted and modified. In the existing technology, manual methods are often used to re-parse the entire combined model, update the corresponding code, and re-configure the files. This process is not only time-consuming and labor-intensive, but also prone to errors, resulting in low efficiency. This solution is proposed to overcome the above problems or at least partially solve the above problems.
[0005] On the one hand, some embodiments of this specification aim to provide a combined model configuration method, the method comprising:
[0006] Get model portfolio information;
[0007] Using the model combination information, construct external interfaces corresponding to multiple combination models and generate corresponding routing data;
[0008] Monitor the dynamic online or offline requests of the combined model in real time;
[0009] According to the dynamic online request, load the target routing data corresponding to the dynamic online request and open the corresponding external interface;
[0010] According to the dynamic offline request, it is determined whether there is target routing data corresponding to the dynamic offline request in the running routing data, and based on the determination result, the target routing data corresponding to the dynamic offline request is deleted, and the corresponding external interface is closed.
[0011] Furthermore, model combination information is obtained, including:
[0012] Obtain visual model combination and arrangement requirements input by users;
[0013] Extracting node and node relationship data from the model combination orchestration requirements;
[0014] Model combination information is determined based on the nodes and node relationship data.
[0015] Furthermore, after obtaining the model combination information, it further includes:
[0016] According to the node and node relationship data in the model combination information, when an error occurs in the data flow, a global exception handling statement in the data flow process is executed;
[0017] Returns the exception response information body corresponding to the global exception handling statement to eliminate exceptions in the data flow process according to the exception response information body.
[0018] Furthermore, the model combination information is used to construct external interfaces corresponding to various combination models, and generate corresponding routing data, including:
[0019] According to the model combination information, construct external interfaces corresponding to multiple combination models respectively;
[0020] Determine the data flow process of each model combination according to the nodes and node relationship data in the model combination information, and generate routing rule data corresponding to each model combination based on the data flow process;
[0021] Generate routing data that meets the requirements of the preset template based on the routing rule data.
[0022] Furthermore, according to the dynamic online request, the target routing data corresponding to the dynamic online request is loaded, and the corresponding external interface is opened, including:
[0023] According to the dynamic online request, searching whether there is target routing data corresponding to the dynamic online request in the running routing data;
[0024] If it exists, load the target routing class data into the context container and open the corresponding external interface;
[0025] If it does not exist, obtain the model combination information of the route to be constructed corresponding to the dynamic online request;
[0026] According to the model combination information of the route to be constructed, a corresponding external interface is constructed and corresponding target route class data is generated;
[0027] Load the target routing data into the context container and open the corresponding external interface.
[0028] Furthermore, according to the dynamic online request, after loading the target routing data corresponding to the dynamic online request and opening the corresponding external interface, it further includes:
[0029] Get the request message;
[0030] According to the request message, determine the corresponding entry route from the target routing data corresponding to the dynamic online request, and determine whether there are multiple paths after the entry route;
[0031] If there are no multiple paths, executing the request message in unicast mode;
[0032] If there are multiple paths, the request messages are executed in parallel in a multicast mode.
[0033] Furthermore, according to the dynamic online request, after loading the target routing data corresponding to the dynamic online request and opening the corresponding external interface, it further includes:
[0034] Get the request message;
[0035] Obtain model input parameters from the request message and call the corresponding online model;
[0036] Inputting the model input parameters into the online model to obtain a model response;
[0037] The model response is passed to the next node.
[0038] Furthermore, according to the dynamic online request, after loading the target routing data corresponding to the dynamic online request and opening the corresponding external interface, it further includes:
[0039] Get the request message;
[0040] Get the request parameters from the request message and determine the corresponding query interface;
[0041] Obtaining a query interface response corresponding to the request parameters from the query interface;
[0042] Pass the query interface response to the next node.
[0043] Furthermore, according to the dynamic online request, after loading the target routing data corresponding to the dynamic online request and opening the corresponding external interface, it further includes:
[0044] Determine the aggregation node and the predecessor node corresponding to each aggregation node in the target routing data corresponding to the dynamic online request;
[0045] At the aggregation node, the data transmitted by all the preceding nodes corresponding to each aggregation node are integrated to obtain an integration result;
[0046] The integration result is passed to the next node of the aggregation node.
[0047] Further, according to the dynamic offline request, determining whether there is target routing data corresponding to the dynamic offline request in the running routing data, deleting the target routing data corresponding to the dynamic offline request based on the determination result, and closing the corresponding external interface, including:
[0048] According to the dynamic offline request, determining whether there is target routing data corresponding to the dynamic offline request in the running routing data;
[0049] If it exists, delete the target routing class data from the context container and close the corresponding external interface;
[0050] If it does not exist, the dynamic offline request is rejected.
[0051] Furthermore, in some embodiments, the method further comprises:
[0052] Get external request message;
[0053] Verifying the external request message using a preset gateway to obtain an external request message that passes the verification;
[0054] The verified external request message is forwarded to the corresponding combination model to execute the verified external request message.
[0055] On the other hand, some embodiments of this specification further provide a combined model configuration device, the device comprising:
[0056] Receiving module, used to obtain model combination information;
[0057] A generation module is used to use the model combination information to construct external interfaces corresponding to multiple combination models and generate corresponding routing data;
[0058] The monitoring module is used to monitor the dynamic online request or dynamic offline request of the combination model in real time;
[0059] An online module, configured to load target routing data corresponding to the dynamic online request and open a corresponding external interface according to the dynamic online request;
[0060] The offline module is used to determine whether there is target routing data corresponding to the dynamic offline request in the running routing data according to the dynamic offline request, and delete the target routing data corresponding to the dynamic offline request based on the judgment result, and close the corresponding external interface.
[0061] On the other hand, some embodiments of this specification further provide a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the computer program executes instructions of the above method when executed by the processor.
[0062] On the other hand, some embodiments of this specification further provide a computer storage medium having a computer program stored thereon, wherein the computer program executes the instructions of the above method when executed by a processor of a computer device.
[0063] On the other hand, some embodiments of this specification further provide a computer program product, which includes a computer program. When the computer program is executed by a processor of a computer device, the computer program executes instructions of the above method.
[0064] Some embodiments of this specification provide one or more technical solutions that have at least the following technical effects:
[0065] The embodiments of the present specification first automatically obtain model combination information, and based on the model combination information, respectively construct an external interface for each combination model, and generate routing class data for each combination model. Then, by real-time monitoring of dynamic online requests or dynamic offline requests of the combination model, by loading the target routing class data corresponding to the dynamic online request and opening the corresponding external interface, the desired combination model can be quickly and accurately online. By judging whether the target routing class data corresponding to the dynamic offline request exists in the running routing class data, it is determined whether the dynamic offline request is valid. If the dynamic offline request is valid, the target routing class data corresponding to the dynamic offline request is deleted, and the corresponding external interface is closed, so as to quickly and accurately offline the combination model that is no longer needed, thereby achieving efficient and accurate configuration of the combination model under the ever-changing business needs, and quickly and accurately providing multiple versions of the combination model required by users.
[0066] The above description is only an overview of the technical solutions of some embodiments of this specification. In order to more clearly understand the technical means of some embodiments of this specification, they can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of some embodiments of this specification more obvious and easy to understand, the specific implementation methods of some embodiments of this specification are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate some embodiments of this specification or technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments described in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without inventive work. In the drawings:
[0068] Figure 1 A schematic diagram of an implementation system of a combined model configuration method in some embodiments of this specification is shown;
[0069] Figure 2 A flowchart of a combined model configuration method in some embodiments of this specification is shown;
[0070] Figure 3 This is a schematic diagram of the dynamic online process of the combined model in some embodiments of this specification;
[0071] Figure 4 This is a schematic diagram of the dynamic offline process of the combined model in some embodiments of this specification;
[0072] Figure 5 This is a schematic diagram of the model combination service call process in some embodiments of this specification;
[0073] Figure 6 This is a structural diagram of a combined model configuration device in some embodiments of this specification;
[0074] Figure 7 This is a schematic diagram of the computer device structure provided in some embodiments of this specification.
[0075] [Description of Reference Numerals]
[0076] 101. Terminal;
[0077] 102. Server;
[0078] 601, receiving module;
[0079] 602. Generate module;
[0080] 603, monitoring module;
[0081] 604, online module;
[0082] 605, offline module;
[0083] 702. Computer equipment;
[0084] 704, processor;
[0085] 706. Memory;
[0086] 708, driving mechanism;
[0087] 710, input / output interface;
[0088] 712. Input devices;
[0089] 714. Output device;
[0090] 716. Presentation equipment;
[0091] 718. Graphical User Interface;
[0092] 720, network interface;
[0093] 722, communication link;
[0094] 724. Communication bus. DETAILED DESCRIPTION
[0095] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings of some embodiments of this specification. Obviously, the embodiments described are only some of the embodiments of this specification, not all of them. All other embodiments obtained by those skilled in the art based on some of the embodiments in this specification without creative work should fall within the scope of protection of this specification.
[0096] It should be noted that the terms "first", "second", etc. in the specification and claims of this document and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of this document described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. It should be noted that the acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of relevant laws and regulations.
[0097] like Figure 1 The diagram shows a schematic diagram of a system for implementing a combination model configuration method according to an embodiment of the present invention, which may include: a terminal 101 and a server 102. The terminal 101 and the server 102 communicate with each other via a network. The network may include a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof, and is connected to a website, a user device (such as a computing device), and a back-end system. A staff member may send a combination model configuration request to the server 102 via the terminal 101. After receiving the combination model configuration request, the server 102 calls the model combination information in the database for calculation and processing, realizes the routing corresponding to different combination models that are dynamically online or offline, obtains the combination model configuration result, and sends the combination model configuration result to the terminal 101 so that the staff member can process the business according to the combination model configuration result.
[0098] In the embodiments of this specification, the server 102 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms.
[0099] In an optional embodiment, the terminal 101 may include, but is not limited to, electronic devices such as self-service terminals, desktop computers, tablet computers, laptop computers, and smart wearable devices. Optionally, the operating system running on the electronic device may include, but is not limited to, Android, iOS, Linux, and Windows. Of course, the terminal 101 is not limited to the aforementioned electronic devices having a certain physical form; it may also be software running on the aforementioned electronic devices.
[0100] In addition, it should be noted that Figure 1 What is shown is only an application environment provided by the present disclosure. In actual application, multiple terminals 101 may be included, and this specification does not limit this.
[0101] Figure 2 It is a flowchart of a combined model configuration method provided by an embodiment of the present invention. This specification provides the method operation steps described in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many steps, and does not represent the only execution order. When the actual system or device product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings. Specifically, Figure 2 As shown, applying the above-mentioned server side, the method may include:
[0102] S201: Obtain model combination information.
[0103] Specifically, the model combination information is determined based on the visual model combination orchestration requirements input by the user. The visual model combination orchestration requirements can be convenient for user input. For example, the visual model combination orchestration requirements can be image requirements, text requirements, etc. The visual model combination orchestration requirements include the nodes and node relationship data of the combination model. Image recognition or text recognition can be used to extract the nodes and node relationship data from the model combination orchestration requirements to quickly and accurately determine the model combination information based on the nodes and node relationship data.
[0104] In some embodiments, model combination information can be used to construct a combination model to characterize the data flow relationship between the sub-models of the combination model. However, in the actual data flow process, there may be errors, such as sub-model parameter loss, network service disconnection, non-standard transmission format and other abnormal situations. It is necessary to verify whether there are abnormal situations in the data flow process based on the nodes and node relationship data in the model combination information, and when an error occurs in the data flow, execute the global exception handling statement in the data flow process, and then return the exception response information body corresponding to the global exception handling statement to eliminate the exception in the data flow process according to the exception response information body to ensure that the data can flow normally.
[0105] S202: Utilizing the model combination information, construct external interfaces corresponding to a plurality of combination models, and generate corresponding routing data.
[0106] Utilize the nodes and node relationship information in the model combination information to develop interfaces and call interfaces for a variety of combination models respectively, so as to create an external interface corresponding to each combination model. Specifically, interface development may include interface definition, parameter acquisition, logic return and result processing, and in some embodiments, the external interface is in RESTful style. The RESTful style external interface can realize the separation of front-end and back-end. The front-end of the external interface can be responsible for obtaining the request input by the user, and the back-end of the external interface processes the data corresponding to the request and transmits it to the subsequent processing node in json format. This also means that the same external interface can be used for front-ends such as Web, iOS and Android, and the cost of debugging and modifying the subsequent interface is relatively low. Furthermore, the content of the interface definition may include defining the path, request method and parameter definition of the interface. The commonly used request methods in the embodiments of this specification include get, post, put and delete, etc. The path and parameter definitions must comply with the preset definition specifications. Parameter acquisition includes obtaining header, path, query parameter and body, and logical return is used to implement basic logical processing of object attributes. Result processing is used to ensure that the returned data is in JSON format. The interface call process is used to package the interface data according to the preset interface format. The interface format includes the interface request method, request header, request body, request path parameters, etc., so as to quickly build the external interface corresponding to each combination model.
[0107] Based on the nodes and node relationship data in the model combination information, the data flow process for each model combination can be determined. The data flow process can be understood as a directed topological graph, where nodes represent submodels and arrows between nodes can be used to represent the direction of data flow. By traversing the data flow process, the node information and node relationship information of each node are determined. Node information can include node identification, node attributes, and node type, thereby quickly and accurately generating routing rule data corresponding to each model combination. Subsequently, since routing rule data cannot be directly loaded into the context environment, it is necessary to generate routing class data that meets the requirements of the preset template based on the created routing rule data to enable the loading of routing class data.
[0108] S203: Monitor the dynamic online request or dynamic offline request of the combination model in real time.
[0109] The real-time monitoring method can be redis monitoring online topic messages and offline topic messages, so as to obtain dynamic online requests or dynamic offline requests of the combined model. This article does not limit the specific monitoring method.
[0110] S204: According to the dynamic online request, target routing data corresponding to the dynamic online request is loaded, and a corresponding external interface is opened.
[0111] Refer to the attached Figure 3 The schematic diagram of the dynamic online process of the combined model shown in the figure shows that, in response to the dynamic online request, it is first necessary to search whether there is target routing class data corresponding to the dynamic online request in the currently running routing class data. If there is target routing class data corresponding to the dynamic online request, the target routing class data is loaded into the context environment container, and the combined model corresponding to the dynamic online request is determined, and the external interface corresponding to the combined model is opened. If there is no target routing class data corresponding to the dynamic online request, it is necessary to obtain the model combination information of the route to be constructed corresponding to the dynamic online request, and use the method described in S202 above to construct the corresponding external interface according to the model combination information of the route to be constructed, and generate the corresponding target routing class data, so as to load the constructed target routing class data into the context environment container, and open the corresponding external interface to quickly realize the model combination input by the online user, so as to provide the user with the required combined model processing results.
[0112] S205: According to the dynamic offline request, determine whether there is target routing data corresponding to the dynamic offline request in the running routing data, delete the target routing data corresponding to the dynamic offline request based on the determination result, and close the corresponding external interface.
[0113] Refer to the attached Figure 4The schematic diagram of the dynamic offline process of the combined model shown in the figure responds to the dynamic offline request, determines whether there is target routing class data corresponding to the dynamic offline request in the currently running routing class data, and if there is target routing class data corresponding to the dynamic offline request, deletes the target routing class data from the context environment container and closes the corresponding external interface, and if there is no target routing class data corresponding to the dynamic offline request, rejects the dynamic offline request, thereby realizing the rapid and accurate offline of the model combination that the user no longer needs, and reducing network expenses.
[0114] The embodiments of the present specification first automatically obtain model combination information, and based on the model combination information, respectively construct an external interface for each combination model, and generate routing class data for each combination model. Then, by real-time monitoring of dynamic online requests or dynamic offline requests of the combination model, by loading the target routing class data corresponding to the dynamic online request and opening the corresponding external interface, the desired combination model can be quickly and accurately online. By judging whether the target routing class data corresponding to the dynamic offline request exists in the running routing class data, it is determined whether the dynamic offline request is valid. If the dynamic offline request is valid, the target routing class data corresponding to the dynamic offline request is deleted, and the corresponding external interface is closed, so as to quickly and accurately offline the combination model that is no longer needed, thereby achieving efficient and accurate configuration of the combination model under the ever-changing business needs, and quickly and accurately providing multiple versions of the combination model required by users.
[0115] Furthermore, when the combined model that the user needs to use is online, a request message can be sent to the combined model so that the combined model performs diversified processing on the request message. Specifically, in some embodiments, according to the dynamic online request, the target routing class data corresponding to the dynamic online request is loaded, and the corresponding external interface is opened, further comprising:
[0116] Get the request message;
[0117] According to the request message, determine the corresponding entry route from the target routing data corresponding to the dynamic online request, and determine whether there are multiple paths after the entry route;
[0118] If there are no multiple paths, executing the request message in unicast mode;
[0119] If there are multiple paths, the request messages are executed in parallel in a multicast mode.
[0120] It can be understood that in some embodiments, for the convenience of description, the combined model corresponding to the dynamic online request is recorded as the online model. After obtaining the request message sent externally, the request message is first forwarded to the entry route of the online model. The entry route is the routing entry in the target routing class data. Depending on whether there are multiple propagation paths after the entry route, a suitable propagation mode can be selected. That is, when there are no multiple paths, the request message is executed in unicast mode. When there are multiple paths, the request message is executed in parallel in multicast mode to ensure the execution efficiency of the request message in multiple paths.
[0121] Furthermore, in some embodiments, after loading the target routing data corresponding to the dynamic online request and opening the corresponding external interface according to the dynamic online request, the method further includes:
[0122] Get the request message;
[0123] Obtain model input parameters from the request message and call the corresponding online model;
[0124] Inputting the model input parameters into the online model to obtain a model response;
[0125] The model response is passed to the next node.
[0126] It can be understood that in some embodiments, for the convenience of description, the combined model corresponding to the dynamic online request is recorded as the online model. After obtaining the request message sent externally, if any sub-model in the online model is an online model, where the online model is usually a pre-trained model, then when the request message is forwarded to the node where the online model is located, it is first necessary to obtain the model input parameters from the model input parameters, and call the corresponding online model, and then input the model input parameters into the online model to obtain the model response. After that, according to the corresponding target routing class data, the model response is passed to the next node to quickly complete the work of calling the online model for data processing.
[0127] Furthermore, in some embodiments, after loading the target routing data corresponding to the dynamic online request and opening the corresponding external interface according to the dynamic online request, the method further includes:
[0128] Get the request message;
[0129] Get the request parameters from the request message and determine the corresponding query interface;
[0130] Obtaining a query interface response corresponding to the request parameters from the query interface;
[0131] Pass the query interface response to the next node.
[0132] It can be understood that in some embodiments, for the convenience of description, the combined model corresponding to the dynamic online request is recorded as the online model. After obtaining the request message sent externally, if any sub-model in the online model is used for data query, then when the request message is forwarded to the corresponding data query node, it is necessary to obtain the corresponding request parameters (used to indicate the content to be queried) from the request message, and match and determine the corresponding query interface, and obtain the query interface response corresponding to the request parameters from the query interface, and then pass the query interface response to the next node according to the corresponding target routing data to quickly complete the data query work in the combined model.
[0133] Furthermore, in some embodiments, after loading the target routing data corresponding to the dynamic online request and opening the corresponding external interface according to the dynamic online request, the method further includes:
[0134] Determine the aggregation node and the predecessor node corresponding to each aggregation node in the target routing data corresponding to the dynamic online request;
[0135] At the aggregation node, the data transmitted by all the preceding nodes corresponding to each aggregation node are integrated to obtain an integration result;
[0136] The integration result is passed to the next node of the aggregation node.
[0137] It can be understood that in some embodiments, taking nodes A, B and C as an example, the relationship between nodes A, B and C is: A→C, B→C, and there is no association between A and B. At this time, C belongs to the aggregation node, A and B are the predecessor nodes of C, and the aggregation node needs to obtain the processing results of all its predecessor nodes. Therefore, each aggregation needs to wait for the data transmitted by all predecessor nodes to be transmitted to the aggregation node, and then integrate the data transmitted by all predecessor nodes corresponding to each aggregation node to obtain the aggregation result, and then pass the integration node to the next node of the aggregation node, thereby reducing the number and frequency of message forwarding and reducing network expenses.
[0138] Furthermore, in some embodiments, it further comprises:
[0139] Get external request message;
[0140] Verifying the external request message using a preset gateway to obtain an external request message that passes the verification;
[0141] The verified external request message is forwarded to the corresponding combination model to execute the verified external request message.
[0142] It can be understood that in some embodiments, referring to the attached Figure 5The model combination service call flow diagram shown in the figure, the model combination corresponds to multiple combination models, each combination model may need to call the online model and data query interface, wherein, in each combination model, the order of calling the online model and calling the data query interface is determined by the routing class data corresponding to each combination model. Figure 5 It is not limited in this document. Different combination models may need to call the same online model and data query interface. When users apply the combination model for data processing, in order to ensure security, they can set a preset gateway filter before all combination models receive the request message to verify the external request message. The preset gateway includes a parameter verification filter and a route forwarding filter. The parameter verification filter is used to verify the external request message to ensure that the external request message meets the message specification required by the model combination information. The route forwarding filter is used to parse the external request message and determine to which combination model's external interface the external request message needs to be forwarded. If, in the current context, the routing class data corresponding to the external request message does not match any running routing class data, the external request message will be rejected.
[0143] It should be noted that although the operations of the method of the present invention are described in a specific order in the above embodiments and drawings, this does not require or imply that these operations must be performed in this specific order, or that all illustrated operations must be performed to achieve the desired results. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0144] Corresponding to the above-mentioned combination model configuration method, some embodiments of this specification also provide a combination model configuration device, referring to Figure 6 As shown, in some embodiments, the apparatus may include:
[0145] Receiving module 601, used to obtain model combination information;
[0146] A generation module 602 is used to construct external interfaces corresponding to multiple combination models using the model combination information and generate corresponding routing data;
[0147] A monitoring module 603 is used to monitor the dynamic online request or dynamic offline request of the combination model in real time;
[0148] The online module 604 is used to load the target routing data corresponding to the dynamic online request and open the corresponding external interface according to the dynamic online request;
[0149] The offline module 605 is used to determine whether there is target routing data corresponding to the dynamic offline request in the running routing data according to the dynamic offline request, and delete the target routing data corresponding to the dynamic offline request based on the judgment result, and close the corresponding external interface.
[0150] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0151] It should be noted that in the embodiments of this specification, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user and fully authorized by all parties.
[0152] It should be noted that the computer program product described in this specification is a software product that mainly implements the method described in this specification through a computer program.
[0153] The embodiment of this specification also provides a computer device. Figure 7 As shown, in some embodiments of this specification, the computer device 702 may include one or more processors 704, such as one or more central processing units (CPUs) or graphics processing units (GPUs), each of which may implement one or more hardware threads. The computer device 702 may also include any memory 706 for storing any type of information, such as code, settings, data, etc. In a specific embodiment, the memory 706 may contain a computer program that can be executed by the processor 704. When executed by the processor 704, the computer program can execute instructions of any of the methods described in any of the above embodiments. For example, without limitation, the memory 706 may include any one or more combinations of the following: any type of RAM, any type of ROM, a flash memory device, a hard disk, an optical disk, etc. More generally, any memory may use any technology to store information. Furthermore, any memory may provide volatile or non-volatile retention of information. Furthermore, any memory may represent a fixed or removable component of the computer device 702. In one embodiment, when the processor 704 executes the associated instructions stored in any memory or combination of memories, the computer device 702 may perform any operation of the associated instructions. The computer device 702 also includes one or more drive mechanisms 708 for interacting with any storage, such as a hard disk drive mechanism, an optical disk drive mechanism, and the like.
[0154] The computer device 702 may also include an input / output interface 710 (I / O) for receiving various inputs (via input devices 712) and for providing various outputs (via output devices 714). A specific output mechanism may include a presentation device 716 and an associated graphical user interface 718 (GUI). In other embodiments, the input / output interface 710 (I / O), input devices 712, and output devices 714 may not be included, and the computer device 702 may simply be a computer device in a network. The computer device 702 may also include one or more network interfaces 720 for exchanging data with other devices via one or more communication links 722. One or more communication buses 724 couple the components described above together.
[0155] The communication link 722 may be implemented in any manner, for example, via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 722 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
[0156] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), computer-readable storage media, and computer program products of some embodiments of the present specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processor to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processor generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0157] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processor to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, the instruction device being implemented in the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0158] These computer program instructions can also be loaded onto a computer or other programmable data processor so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0159] In a typical configuration, a computer device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0160] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0161] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computer device. As defined in this specification, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0162] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0163] Embodiments of this specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. Embodiments of this specification may also be practiced in distributed computing environments where tasks are performed by remote processors connected via a communications network. In distributed computing environments, program modules may be located in local and remote computer storage media, including storage devices.
[0164] It should also be understood that in the embodiments of this specification, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. Furthermore, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0165] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0166] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiments of this specification. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.
[0167] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A combined model configuration method, characterized in that: The method comprises: Get model combination information; Using the model combination information, construct external interfaces corresponding to multiple combination models, and generate corresponding routing data; Monitor the dynamic online or offline requests of the combined model in real time; According to the dynamic online request, load the target routing class data corresponding to the dynamic online request, and open the corresponding external interface; According to the dynamic offline request, it is determined whether there is target routing data corresponding to the dynamic offline request in the running routing data, and based on the determination result, the target routing data corresponding to the dynamic offline request is deleted, and the corresponding external interface is closed.
2. The method according to claim 1, characterized in that Get model portfolio information, including: Obtain visual model combination and arrangement requirements input by users; Extracting nodes and node relationship data from the model combination orchestration requirements; Model combination information is determined according to the nodes and node relationship data.
3. The method according to claim 2, characterized in that After obtaining the model combination information, it further includes: According to the nodes and node relationship data in the model combination information, when an error occurs in the data flow, a global exception handling statement in the data flow process is executed; The exception response information body corresponding to the global exception handling statement is returned to eliminate the exception in the data flow process according to the exception response information body.
4. The method according to claim 1, characterized in that Using the model combination information, construct external interfaces corresponding to various combination models, and generate corresponding routing data, including: According to the model combination information, external interfaces corresponding to various combination models are constructed respectively; Determine the data flow process of each model combination according to the nodes and node relationship data in the model combination information, and generate routing rule data corresponding to each model combination based on the data flow process; Generate routing data that meets the requirements of the preset template according to the routing rule data.
5. The method according to claim 1, characterized in that According to the dynamic online request, the target routing class data corresponding to the dynamic online request is loaded, and the corresponding external interface is opened, including: According to the dynamic online request, searching whether there is target routing data corresponding to the dynamic online request in the running routing data; If it exists, load the target routing class data into the context environment container and open the corresponding external interface; If it does not exist, obtaining the model combination information of the route to be constructed corresponding to the dynamic online request; According to the model combination information of the route to be constructed, a corresponding external interface is constructed, and corresponding target route class data is generated; The target routing class data is loaded into the context environment container, and the corresponding external interface is opened.
6. The method according to claim 1, characterized in that According to the dynamic online request, after loading the target routing class data corresponding to the dynamic online request and opening the corresponding external interface, further comprising: Get the request message; According to the request message, determine the corresponding entry route from the target route class data corresponding to the dynamic online request, and judge whether there are multiple paths after the entry route; If there are no multiple paths, executing the request message in unicast mode; If there are multiple paths, the request messages are executed in parallel in multicast mode.
7. The method according to claim 1, characterized in that According to the dynamic online request, after loading the target routing class data corresponding to the dynamic online request and opening the corresponding external interface, further comprising: Get the request message; Obtaining model input parameters from the request message and calling the corresponding online model; Inputting the model input parameters into the online model to obtain a model response; The model response is passed to the next node.
8. The method according to claim 1, characterized in that According to the dynamic online request, after loading the target routing class data corresponding to the dynamic online request and opening the corresponding external interface, further comprising: Get the request message; Get request parameters from the request message and determine the corresponding query interface; Obtaining a query interface response corresponding to the request parameter from the query interface; Pass the query interface response to the next node.
9. The method according to claim 1, characterized in that: According to the dynamic online request, after loading the target routing class data corresponding to the dynamic online request and opening the corresponding external interface, further comprising: Determine an aggregation node in the target routing data corresponding to the dynamic online request and a preceding node corresponding to each aggregation node; At the aggregation node, the data transmitted by all the preceding nodes corresponding to each aggregation node are integrated to obtain an integration result; The integration result is passed to the next node of the aggregation node.
10. The method according to claim 1, characterized in that According to the dynamic offline request, determining whether there is target routing data corresponding to the dynamic offline request in the running routing data, deleting the target routing data corresponding to the dynamic offline request based on the determination result, and closing the corresponding external interface, including: According to the dynamic offline request, determining whether there is target routing data corresponding to the dynamic offline request in the running routing data; If it exists, delete the target routing class data from the context environment container and close the corresponding external interface; If it does not exist, the dynamic offline request is rejected.
11. The method according to claim 1, characterized in that: Further including: Get external request message; Verifying the external request message by using a preset gateway to obtain an external request message that passes the verification; The verified external request message is forwarded to the corresponding combination model to execute the verified external request message.
12. A combined model configuration device, characterized in that: The device comprises: A receiving module, used for obtaining model combination information; A generation module, used to construct external interfaces corresponding to a plurality of combination models by using the model combination information, and generate corresponding routing data; A monitoring module is used to monitor the dynamic online request or dynamic offline request of the combined model in real time; An online module, used for loading target routing data corresponding to the dynamic online request and opening a corresponding external interface according to the dynamic online request; The offline module is used to determine whether there is target routing class data corresponding to the dynamic offline request in the running routing class data according to the dynamic offline request, and delete the target routing class data corresponding to the dynamic offline request based on the judgment result, and close the corresponding external interface.
13. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: When the computer program is executed by the processor, the computer program executes the instructions of the method according to any one of claims 1 to 11.
14. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor of a computer device, the computer program executes the instructions of the method according to any one of claims 1 to 11.
15. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program executes instructions of the method according to any one of claims 1-11.