CN116743880A - Service engine interface adapting method, adapting device and adapting system - Google Patents

Service engine interface adapting method, adapting device and adapting system Download PDF

Info

Publication number
CN116743880A
CN116743880A CN202310678248.2A CN202310678248A CN116743880A CN 116743880 A CN116743880 A CN 116743880A CN 202310678248 A CN202310678248 A CN 202310678248A CN 116743880 A CN116743880 A CN 116743880A
Authority
CN
China
Prior art keywords
target
engine
service
function
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310678248.2A
Other languages
Chinese (zh)
Inventor
邓萍
朱峰
张兰英
呙亚南
陆俊
江黎枫
李培
安迪
原菁菁
高舒
文禄
郭玉春
尚超
刘仕优
杜依迪
马淞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Postal Savings Bank of China Ltd
Original Assignee
Postal Savings Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Postal Savings Bank of China Ltd filed Critical Postal Savings Bank of China Ltd
Priority to CN202310678248.2A priority Critical patent/CN116743880A/en
Publication of CN116743880A publication Critical patent/CN116743880A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a service engine interface adapting method, an adapting device and an adapting system, wherein the method comprises the following steps: receiving external requests sent by external equipment by adopting a target interface in the gateway, wherein the target interface is used for receiving various external requests; based on interface adaptation service, converting an initial protocol of an external request into a target protocol, so as to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine; and determining a target engine from the plurality of service engines at least according to the target external request, and controlling an interface of the target engine to receive the target external request so that the target engine executes the function corresponding to the external request, wherein the target engine is the service engine for the function corresponding to the external request. The external request data based on different multimedia protocols is converted into a unified data protocol based on the interface adaptation service to achieve the aim of decoupling an external request and an engine interface, so that interaction with an engine is facilitated.

Description

Service engine interface adapting method, adapting device and adapting system
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a service engine interface adapting method, a service engine interface adapting device, a service engine interface adapting system and electronic equipment.
Background
Along with the gradual maturation of technology and the great promotion of calculation power, the application scene of artificial intelligence is more diversified, intelligent, influences the development forms of various industries such as finance, service, manufacturing.
Artificial intelligence technology has great value in various business scenarios. However, the artificial intelligence capability is distributed in different systems in a scattered manner, and related computing resources, model resources and management resources are not completed in unified management, unified planning and unified scheduling, so that the situations of repeated construction, unreasonable resource allocation and the like are unavoidable. When the artificial intelligence capability is applied to the floor, research, development and deployment are performed based on different platforms and different structures, so that accumulation and iteration of the technology are not facilitated, the application of the technology in a business scene is not facilitated, more importantly, an artificial intelligence technology manufacturer capability interface (i.e. an engine interface) is coupled with a business code (i.e. an external request), the application of business and capability is not flexible enough, and the engine type selection cost is high.
Disclosure of Invention
The application mainly aims to provide a service engine interface adapting method, a service engine interface adapting device, a service engine interface adapting system and electronic equipment, which at least solve the problems that the service and the application of the capability are not flexible enough and the engine type selecting cost is high due to the fact that the existing engine interface is coupled with an external request.
To achieve the above object, according to one aspect of the present application, there is provided a service engine interface adaptation method, including: receiving an external request sent by external equipment by adopting a target interface in a gateway, wherein the target interface is used for receiving a plurality of external requests, different initial protocols of the external requests are different, and the target interface is established based on an interface adaptation service; converting an initial protocol of the external request into a target protocol based on the interface adaptation service to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different; and determining a target engine from a plurality of service engines at least according to the target external request, and controlling an interface of the target engine to receive the target external request so that the target engine executes the function corresponding to the external request, wherein the target engine is the service engine for the function corresponding to the external request.
Optionally, based on the interface adaptation service, converting the initial protocol of the external request into a target protocol to obtain a target external request, including: acquiring an initial message format of the external request, wherein the initial message format of the external request is determined based on the initial protocol; analyzing the initial message format of the external request to obtain the data information of the external request; and repackaging the data information of the external request by adopting the target protocol so as to convert the initial protocol of the external request into the target protocol, thereby obtaining the target external request.
Optionally, determining a target engine from a plurality of the service engines at least according to the target external request, including: acquiring the functions of each service engine, wherein each service engine comprises one or more different functions; according to the target external request, determining the function to be called by the target external request as a target function, wherein the target function at least comprises one of the following steps: a voice recognition function, a semantic understanding function, a voice synthesis function, a face recognition function, a voiceprint recognition function and a fingerprint recognition function; one or more target engines are determined from a plurality of service engines according to the target functions and the functions of the service engines, wherein the functions of the target engines at least comprise one target function.
Optionally, the target functions are multiple, and determining one or more target engines from the multiple service engines according to the target functions and the functions of each service engine includes: in the case that only one kind of the target function is included in each service engine, determining the service engine including the target function as the target engine according to the target function and the function of each service engine, and determining the execution sequence of each target engine according to the implementation sequence of the target function, wherein the target engine has a plurality of target engines; in the case where a plurality of the target functions are included in each of the service engines, the service engine including all the target functions is determined as the target engine.
Optionally, the target functions are two, the two target functions are a first target function and a second target function, and when each service engine includes only one target function, determining, according to the target function and the function of each service engine, the service engine including the target function as the target engine, and determining, according to the order of implementation of the target functions, the execution order of each target engine includes: splitting the target external request into a first request and a second request according to the implementation sequence of a plurality of target functions, wherein the function to be called by the first request is the first target function, the function to be called by the second request is the second target function, and the implementation sequence is that the first target function is implemented before the second target function is implemented; determining a first one of the target engines from a plurality of the service engines according to the first target function and the function of each of the service engines, the first one of the target engines including the first target function; determining a second target engine from a plurality of service engines according to the second target function and the function of each service engine, wherein the function of the second target engine comprises the second target function; according to the implementation sequence, a first target engine is adopted to realize the first target function, and then a second target engine is adopted to realize the second target function.
Optionally, determining a target engine from a plurality of the service engines at least according to the target external request, including: acquiring an object code package, wherein the object code package is established based on the interface adaptation service, the object code package comprises a plurality of sub-code packages, and each sub-code package corresponds to one service engine; determining a target subcode packet according to the function to be called by the target external request; and determining the service engine corresponding to the target subcode packet as the target engine.
Optionally, controlling the interface of the target engine to receive the target external request includes: acquiring a standard access field of the target engine and a field name of the standard access field; acquiring a target field corresponding to the standard access field in the target external request, and acquiring a field name of the target field; establishing a mapping relation between the field name of the target field and the field name of the standard access field; and controlling an interface of the target engine to receive the target external request according to the standard access field, the target field and the mapping relation.
According to another aspect of the present application, there is provided an adapting device of a service engine interface, comprising: the receiving unit is used for receiving external requests sent by external equipment by adopting a target interface in the gateway, the target interface is used for receiving a plurality of external requests, the initial protocols of different external requests are different, and the target interface is established based on an interface adaptation service; the adaptation unit is used for adapting the service based on the interface, converting the initial protocol of the external request into a target protocol to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different; and the determining unit is used for determining a target engine from a plurality of service engines at least according to the target external request, controlling an interface of the target engine to receive the target external request so that the target engine executes the function corresponding to the external request, and enabling the target engine to be the service engine for the function corresponding to the external request.
According to another aspect of the present application, there is provided an adaptation system of a service engine interface, comprising: the gateway layer is used for providing a target interface to receive an external request sent by external equipment; the interface adaptation layer is used for providing interface adaptation service to convert the initial protocol of the external request received by the gateway layer into a target protocol so as to obtain a target external request; and the service engine is used for receiving the target external request by adopting an interface based on the target protocol and processing the target external request.
According to another aspect of the present application, there is provided an electronic apparatus including: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising an adaptation method for executing any one of the service engine interfaces.
By applying the technical scheme of the application, the adaptation method of the service engine interface firstly adopts a target interface in the gateway to receive external requests sent by external equipment, the target interface is used for receiving various external requests, the initial protocols of different external requests are different, and the target interface is established based on interface adaptation service; based on interface adaptation service, converting an initial protocol of an external request into a target protocol to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different; and determining a target engine from the plurality of service engines at least according to the target external requests, and controlling an interface of the target engine to receive the target external requests so that the target engine executes the functions corresponding to the external requests, wherein the target engine is the service engine for the functions corresponding to the external requests. The method and the system achieve the aim of decoupling external requests and engine interfaces based on interface adaptation service, convert external request data based on different multimedia protocols into a unified data protocol, facilitate interaction with an engine, and solve the problems that the existing engine interfaces are coupled with the external requests, so that service and capacity application is not flexible enough and the engine type selection cost is high.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
FIG. 1 is a flow diagram of a prior art adaptation method of a service engine interface;
fig. 2 is a block diagram showing a hardware configuration of a mobile terminal for performing an adaptation method of a service engine interface according to an embodiment of the present application;
FIG. 3 is a flow chart of a method of adapting a service engine interface according to an embodiment of the present application;
FIG. 4 is a flow chart illustrating another method of adapting a service engine interface provided in accordance with an embodiment of the present application;
FIG. 5 shows a schematic diagram of an adaptation system of a service engine interface according to an embodiment of the present application;
fig. 6 shows a block diagram of an adaptation device of a service engine interface according to an embodiment of the application.
Wherein the above figures include the following reference numerals:
102. a processor; 104. a memory; 106. a transmission device; 108. and an input/output device.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the application herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As described in the background art, as shown in fig. 1, the capability interface (i.e. engine interface) of the artificial intelligence technical manufacturer in the prior art is coupled with the service code (i.e. external request), that is, one external request corresponds to a specific service engine, and one external request needs a gateway to accept, the service flows between the external requests are mutually independent, and are of a 'chimney type' service architecture, so that resource repeated construction, a flow barrier exists between each data, the service and the application of the capability are not flexible enough, and the engine type selection cost is high.
In order to solve the problems that the service and the capacity are not flexible enough due to the coupling of the existing engine interface and the external request and the engine type selection cost is high, the embodiment of the application provides a service engine interface adaptation method, a service engine interface adaptation device, a service engine interface adaptation system and electronic equipment.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the mobile terminal as an example, fig. 2 is a block diagram of a hardware structure of the mobile terminal according to an adaptation method of a service engine interface according to an embodiment of the present application. As shown in fig. 2, the mobile terminal may include one or more (only one is shown in fig. 2) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 2 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 2, or have a different configuration than shown in fig. 2.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a display method of device information in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, to implement the above-described method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, a method of adapting a service engine interface running on a mobile terminal, a computer terminal or similar computing device is provided, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical sequence is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in a different order than here.
Fig. 3 is a flow chart of a method of adaptation of a service engine interface according to an embodiment of the application. As shown in fig. 3, the method comprises the steps of:
step S201, receiving an external request sent by external equipment by adopting a target interface in a gateway, wherein the target interface is used for receiving a plurality of external requests, different initial protocols of the external requests are different, and the target interface is established based on an interface adaptation service;
specifically, for the definition of an abstract interface, a set of general interface standard is abstracted, external requests for calling different capabilities are combined into one interface, and the interface is distinguished through different types of fields and parameters, so that the interface is suitable for the requirements of calling AI capabilities in various scenes such as single, streaming, text, audio, video and the like. The gateway is also used for realizing functions of access, routing, authentication, verification and the like.
Step S202, converting an initial protocol of the external request into a target protocol based on the interface adaptation service to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different;
specifically, the complexity is reduced by introducing the interface adaptation service, so that the aim of decoupling a service code (external request) and an interface code (service engine) is fulfilled, and data based on different multimedia protocols are converted into a unified data protocol, so that interaction with the engine is facilitated.
The specific implementation steps of the step S202 are as follows:
step S2021, obtaining an initial message format of the external request, where the initial message format of the external request is determined based on the initial protocol;
step S2022, analyzing the initial message format of the external request to obtain the data information of the external request;
step S2023, repackaging the data information of the external request by using the target protocol, so as to convert the initial protocol of the external request into the target protocol, thereby obtaining the target external request.
Specifically, external requests based on different multimedia protocols can be converted into data under a unified target protocol through the steps, and all service engines can identify the target protocol, so that interaction with the service engines is facilitated.
Step S203, at least according to the target external request, determining a target engine from a plurality of service engines, and controlling an interface of the target engine to receive the target external request, so that the target engine executes a function corresponding to the external request, where the target engine is the service engine for the function corresponding to the external request.
Specifically, according to different functions to be called by an external request, the combined call of different engines is provided, so that the service system can use the combination of the multi-mode capabilities more flexibly and conveniently, and the security of the service system call verification function is improved.
The specific implementation steps of the step S203 are as follows:
step S301, obtaining the functions of each service engine, where each service engine includes one or more different functions;
step S302, determining, according to the target external request, a function to be called by the target external request as a target function, where the target function includes at least one of the following: a voice recognition function, a semantic understanding function, a voice synthesis function, a face recognition function, a voiceprint recognition function and a fingerprint recognition function;
Step S303, determining one or more target engines from a plurality of service engines according to the target function and the function of each service engine, where the function of the target engine includes at least one target function.
Specifically, according to the target function required to be called by the target external request, the combined call of different engines is provided, so that the service system can use the combination of the multi-mode capabilities more flexibly and conveniently, and the security of the service system call verification function is improved. And the service reuse rate can be improved, the integration and cooperation barriers between the chimney type system and the project system are broken, the trial-and-error cost of foreground service is reduced, the quick innovation capability of the service is endowed, and the enterprise organization efficiency is improved.
In addition, for the adaptation of call flows, call flows with the same capability of different manufacturers may be different, for example, parameters of manufacturer a may be set in the session start interface, while parameters of other manufacturers have special interface settings, and these differences should be masked when adapting.
Wherein, there are a plurality of target functions, the specific implementation steps of the step S303 are as follows:
step S401, in the case that each service engine includes only one kind of the target function, determining the service engine including the target function as the target engine according to the target function and the function of each service engine, and determining the execution sequence of each target engine according to the implementation sequence of the target function, where there are a plurality of target engines;
The two target functions are a first target function and a second target function, and the implementation steps of the step S401 are as follows:
step S4011, splitting the target external request into a first request and a second request according to an implementation sequence of a plurality of target functions, wherein a function to be called by the first request is the first target function, a function to be called by the second request is the second target function, and the implementation sequence is that the first target function is implemented before the second target function is implemented;
step S4012, determining a first target engine from the service engines according to the first target function and the function of each service engine, wherein the function of the first target engine includes the first target function;
step S4013, determining a second target engine from the plurality of service engines according to the second target function and the function of each service engine, wherein the function of the second target engine includes the second target function;
step S4014, according to the implementation sequence, implementing the first target function by using a first target engine, and implementing the second target function by using a second target engine.
Specifically, for example, the first target function is a voice recognition function, the second target function is a semantic understanding function, the first target engine is called to execute the voice recognition function, the processing result is returned, the second target engine is called to execute the semantic understanding function, the processing result is returned, the calling logic can be adjusted according to actual conditions, different engines correspond to different manufacturers, and external requests can be processed more flexibly.
Step S402, in a case where a plurality of the target functions are included in each of the service engines, determining the service engine including all the target functions as the target engine.
Specifically, for example, in the case where there is only one target function, if both service engines can process the target function, it is determined whether or not there is a specified service engine for the target external request, if there is a specified service engine for the target external request, the specified service engine is used for processing, and if there is no specified service engine for the target external request, one service engine is selected at random for processing. If there are multiple target functions and there is one service engine including all target functions, then the multiple target functions may be processed as one request, and after the target engine processes all target functions, the final processing result is returned. Therefore, the application of the service to the capability is more flexible and convenient, and the accumulation of the technical experience and the service experience as the capability is deposited, so that a long-term competitive advantage is formed.
Wherein determining a target engine from the plurality of service engines based at least on the target external request further comprises the steps of:
step S501, obtaining an object code package, where the object code package is built based on the interface adaptation service, the object code package includes a plurality of subcode packages, and each subcode package corresponds to one service engine;
step S502, determining a target subcode packet according to the function required to be called by the target external request;
step S503, determining the service engine corresponding to the target subcode packet as the target engine.
Specifically, different service engines are called according to different code packages, so that the supplementation and sharing of data, technology and capability can be realized in a short time, the service and technical experience can be conveniently precipitated, and a long-term competitive advantage is formed.
The specific implementation steps for controlling the interface of the target engine to receive the target external request are as follows:
step S601, obtaining a standard access field of the target engine and a field name of the standard access field;
step S602, a target field corresponding to the standard access field in the target external request is obtained, and a field name of the target field is obtained;
Step S603, establishing a mapping relation between the field name of the target field and the field name of the standard access field;
step S604, controlling the interface of the target engine to receive the target external request according to the standard access field, the target field and the mapping relation.
Specifically, through the front-end resource integration unified open interface, the dependence on the same manufacturer is avoided, the technical model selection cost of the engine is reduced, and business personnel can put more energy on the aspect of field application.
According to the adaptation method of the service engine interface, a target interface in a gateway is used for receiving external requests sent by external equipment, the target interface is used for receiving various external requests, different external requests have different initial protocols, and the target interface is established based on interface adaptation service; based on interface adaptation service, converting an initial protocol of an external request into a target protocol to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different; and determining a target engine from the plurality of service engines at least according to the target external requests, and controlling an interface of the target engine to receive the target external requests so that the target engine executes the functions corresponding to the external requests, wherein the target engine is the service engine for the functions corresponding to the external requests. The method and the system achieve the aim of decoupling external requests and engine interfaces based on interface adaptation service, convert external request data based on different multimedia protocols into a unified data protocol, facilitate interaction with an engine, and solve the problems that the existing engine interfaces are coupled with the external requests, so that service and capacity application is not flexible enough and the engine type selection cost is high.
In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the adaptation method of the service engine interface of the present application will be described in detail below with reference to specific embodiments.
The embodiment relates to a specific service engine interface adapting method, as shown in fig. 4, comprising the following steps:
step S1: the external request enters a gateway, the gateway performs access processing on the call and calls a unified interface; and performing operations such as routing, authentication, verification and the like through the gateway, and finally sending the request to the interface adaptation service.
Step S2: the interface adaptation service converts the data based on different multimedia protocols into a unified data protocol, analyzes which capability needs to be called by the request, acquires a code packet of the abstract interface according to the requirement, realizes the abstract method in the code packet, and calls a specific interface to complete the adaptation of the call flow.
Step S3: the capability engine receives the request sent by the interface adaptation, processes the request and returns the result.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides an adapting system of the service engine interface, which comprises the following steps: the gateway layer is used for providing a target interface to receive an external request sent by external equipment; the interface adaptation layer is used for providing interface adaptation service to convert the initial protocol of the external request received by the gateway layer into a target protocol so as to obtain a target external request; and the service engine is used for receiving the target external request by adopting an interface based on the target protocol and processing the target external request.
The adaptation system of the service engine interface of the application comprises: the gateway layer is used for providing a target interface to receive an external request sent by external equipment; the interface adaptation layer is used for providing interface adaptation service to convert the initial protocol of the external request received by the gateway layer into a target protocol so as to obtain a target external request; and the service engine is used for receiving the target external request by adopting an interface based on the target protocol and processing the target external request. The method and the system achieve the aim of decoupling external requests and engine interfaces based on interface adaptation service, convert external request data based on different multimedia protocols into a unified data protocol, facilitate interaction with an engine, solve the problems that the existing engine interfaces are coupled with the external requests, service and capacity are not flexible enough to apply, the engine type selection cost is high, integrate the dispersed capacity, enable the service to apply the capacity more flexibly and conveniently, enable technology and service experience to be accumulated as capacity to settle down, and form a long-lasting competitive advantage.
In an alternative embodiment, as shown in fig. 5, the adaptation system of the service engine interface is a capability output system compatible with heterogeneous multi-source engines, and the architecture of the capability output system is divided into five layers from top to bottom, namely an application layer, a gateway layer, a service layer, an interface adaptation layer and a capability engine layer (i.e. a service engine layer). The application layer relates to a background management interface, an application development interface, an external application interface development and the like. The gateway layer needs to perform unified access processing, such as access, routing, authentication, verification, and the like, on the invocation of the service resources. The service layer provides registration, management and monitoring among the registration center, the configuration center and the call chain monitoring realization module. On the software technical architecture, the method is realized by an object relation and a mapping mode. The interface adaptation layer can convert data based on different multimedia protocols into a unified data protocol, so that an engine can process the data conveniently; acquiring a code package of an abstract interface, realizing an abstract method in the code package, and calling interfaces of all manufacturers in the abstract method to complete the adaptation of a calling flow; and binding the related fields of the service attributes. The capability engine layer deploys the capability engines of each manufacturer and calls the capability engines through the capability interfaces specific to each manufacturer. The system integrates originally dispersed computing power resources, node resources, container resources and the like, forms a customized scheme of containerization and standardized management of the bottom layer engine capacity, overcomes the bottlenecks of repeated resource construction, data circulation barriers and the like caused by the traditional chimney type service architecture, realizes centralized and intensive production and management of the artificial intelligence technology, and promotes the rapid fusion of the artificial intelligence technology with the vertical application scene.
The embodiment of the application also provides an adapting device of the service engine interface, and the adapting device of the service engine interface can be used for executing the adapting method for the service engine interface. The device is used for realizing the above embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The following describes an adapting device of a service engine interface provided by an embodiment of the present application.
Fig. 6 is a schematic diagram of an adaptation device of a service engine interface according to an embodiment of the application. As shown in fig. 6, the apparatus includes a receiving unit 10, an adapting unit 20 and a determining unit 30, where the receiving unit 10 is configured to receive an external request sent by an external device by using a target interface in a gateway, the target interface is configured to receive a plurality of external requests, different initial protocols of the external requests are different, and the target interface is established based on an interface adapting service; the adapting unit 20 is configured to adapt a service based on the interface, convert an initial protocol of the external request into a target protocol, so as to obtain a target external request, where the target protocol is a protocol that can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and interface types of the service engines are different; the determining unit 30 is configured to determine a target engine from a plurality of service engines according to at least the target external request, and control an interface of the target engine to receive the target external request, so that the target engine executes a function corresponding to the external request, where the target engine is the service engine for the function corresponding to the external request.
The adaptation device of the service engine interface comprises a receiving unit, an adaptation unit and a determination unit, wherein the receiving unit is used for receiving external requests sent by external equipment by adopting a target interface in a gateway, the target interface is used for receiving a plurality of external requests, different initial protocols of the external requests are different, and the target interface is established based on interface adaptation service; the adaptation unit is used for adapting service based on the interface, converting an initial protocol of the external request into a target protocol to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different; the determining unit is used for determining a target engine from a plurality of service engines at least according to the target external request, controlling an interface of the target engine to receive the target external request so that the target engine executes a function corresponding to the external request, and enabling the target engine to be the service engine for the function corresponding to the external request. The method and the system achieve the aim of decoupling external requests and engine interfaces based on interface adaptation service, convert external request data based on different multimedia protocols into a unified data protocol, facilitate interaction with an engine, and solve the problems that the existing engine interfaces are coupled with the external requests, so that service and capacity application is not flexible enough and the engine type selection cost is high.
As an alternative scheme, the adapting unit includes a first obtaining module, an analyzing module and an encapsulating module, where the first obtaining module is configured to obtain an initial message format of the external request, where the initial message format of the external request is determined based on the initial protocol; the analysis module is used for analyzing the initial message format of the external request to obtain the data information of the external request; and the packaging module is used for repackaging the data information of the external request by adopting the target protocol so as to convert the initial protocol of the external request into the target protocol and obtain the target external request. Through the steps, external requests based on different multimedia protocols can be converted into data under a unified target protocol, and all service engines can identify the target protocol, so that interaction with the service engines is facilitated
The determining unit includes a second acquiring module, a first determining module and a second determining module, where the second acquiring module is configured to acquire a function of each service engine, and each service engine includes one or more different functions; the first determining module is used for determining a function to be called by the target external request as a target function according to the target external request, and the target function at least comprises one of the following steps: a voice recognition function, a semantic understanding function, a voice synthesis function, a face recognition function, a voiceprint recognition function and a fingerprint recognition function; the second determining module is used for determining one or more target engines from a plurality of service engines according to the target functions and the functions of the service engines, wherein the functions of the target engines at least comprise one target function. The method can improve the service reuse rate, break the integration and cooperation barriers between the chimney type system and the project system, reduce the trial-and-error cost of the foreground service, endow the service with quick innovation capability and improve the enterprise organization efficiency.
In an alternative example, the plurality of target functions are provided, the second determining module includes a third determining module and a fourth determining module, the third determining module is configured to determine, according to the target function and the function of each service engine, the service engine including the target function as the target engine, and determine, according to the order of implementation of the target function, the execution order of each target engine, where each target engine includes a plurality of target engines; the fourth determining module is configured to determine, in a case where a plurality of the target functions are included in each of the service engines, the service engine including all of the target functions as the target engine. The application of the business to the capability can be more flexible and convenient, and the technical experience and the business experience can be accumulated as capability to be deposited, so that a long-term competitive advantage is formed.
As an alternative scheme, the two target functions are a first target function and a second target function, the third determining module comprises a splitting submodule, a first determining submodule, a second determining submodule and an executing submodule, the splitting submodule is used for splitting the target external request into a first request and a second request according to the implementation sequence of a plurality of target functions, the function required to be called by the first request is the first target function, the function required to be called by the second request is the second target function, and the implementation sequence is that the first target function is implemented before the second target function is implemented; a first determining submodule, configured to determine a first target engine from a plurality of service engines according to the first target function and the function of each service engine, where the function of the first target engine includes the first target function; a second determining submodule, configured to determine a second target engine from a plurality of service engines according to the second target function and the function of each service engine, where the function of the second target engine includes the second target function; and the execution submodule is used for realizing the first target function by adopting a first target engine and then realizing the second target function by adopting a second target engine according to the realization sequence. External requests can be handled more flexibly.
The determining unit includes a first acquiring subunit, a first determining subunit and a second determining subunit, where the first acquiring subunit is configured to acquire an object code packet, where the object code packet is established based on the interface adaptation service, and the object code packet includes a plurality of subcode packets, and each subcode packet corresponds to one service engine; the first determining subunit is used for determining a target subcode packet according to the function required to be called by the target external request; the second determining subunit is configured to determine the service engine corresponding to the target subcode packet as the target engine. According to different code packages, different service engines are called, the supplementation and sharing of data, technology and capability can be realized in a short time, the service and technical experience can be conveniently precipitated, and a long-term competitive advantage is formed.
In an alternative scheme, the determining unit comprises a second acquiring subunit, a third acquiring subunit, a building subunit and a control subunit, wherein the second acquiring subunit is used for acquiring a standard access field of the target engine and a field name of the standard access field; the third obtaining subunit is configured to obtain a target field corresponding to the standard access field in the target external request, and obtain a field name of the target field; the establishing subunit is used for establishing a mapping relation between the field name of the target field and the field name of the standard access field; and the control subunit is used for controlling the interface of the target engine to receive the target external request according to the standard access field, the target field and the mapping relation. The front-end resource integration unifies the open interfaces, so that dependence on the same manufacturer is avoided, the technical model selection cost of the engine is reduced, and business personnel can put more energy on the aspect of field application.
The adaptation device of the service engine interface comprises a processor and a memory, wherein the receiving unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions. The modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one, and the problems that the service and the application of the capability are not flexible enough and the engine type selection cost is high due to the fact that the existing engine interface is coupled with an external request are solved by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the invention provides a computer readable storage medium, which comprises a stored program, wherein when the program runs, the device where the computer readable storage medium is located is controlled to execute an adaptation method of a service engine interface.
Specifically, the adaptation method of the service engine interface comprises the following steps:
step S201, receiving an external request sent by external equipment by adopting a target interface in a gateway, wherein the target interface is used for receiving a plurality of external requests, different initial protocols of the external requests are different, and the target interface is established based on an interface adaptation service;
specifically, for the definition of an abstract interface, a set of general interface standard is abstracted, external requests for calling different capabilities are combined into one interface, and the interface is distinguished through different types of fields and parameters, so that the interface is suitable for the requirements of calling AI capabilities in various scenes such as single, streaming, text, audio, video and the like. The gateway is also used for realizing functions of access, routing, authentication, verification and the like.
Step S202, converting an initial protocol of the external request into a target protocol based on the interface adaptation service to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different;
specifically, the complexity is reduced by introducing the interface adaptation service, so that the aim of decoupling a service code (external request) and an interface code (service engine) is fulfilled, and data based on different multimedia protocols are converted into a unified data protocol, so that interaction with the engine is facilitated.
Step S203, at least according to the target external request, determining a target engine from a plurality of service engines, and controlling an interface of the target engine to receive the target external request, so that the target engine executes a function corresponding to the external request, where the target engine is the service engine for the function corresponding to the external request.
Specifically, according to different functions to be called by an external request, the combined call of different engines is provided, so that the service system can use the combination of the multi-mode capabilities more flexibly and conveniently, and the security of the service system call verification function is improved.
Optionally, based on the interface adaptation service, converting the initial protocol of the external request into a target protocol to obtain a target external request, including: acquiring an initial message format of the external request, wherein the initial message format of the external request is determined based on the initial protocol; analyzing the initial message format of the external request to obtain the data information of the external request; and repackaging the data information of the external request by adopting the target protocol so as to convert the initial protocol of the external request into the target protocol, thereby obtaining the target external request.
Optionally, determining a target engine from a plurality of the service engines at least according to the target external request, including: acquiring the functions of each service engine, wherein each service engine comprises one or more different functions; according to the target external request, determining the function to be called by the target external request as a target function, wherein the target function at least comprises one of the following steps: a voice recognition function, a semantic understanding function, a voice synthesis function, a face recognition function, a voiceprint recognition function and a fingerprint recognition function; one or more target engines are determined from a plurality of service engines according to the target functions and the functions of the service engines, wherein the functions of the target engines at least comprise one target function.
Optionally, the target functions are multiple, and determining one or more target engines from the multiple service engines according to the target functions and the functions of each service engine includes: in the case that only one kind of the target function is included in each service engine, determining the service engine including the target function as the target engine according to the target function and the function of each service engine, and determining the execution sequence of each target engine according to the implementation sequence of the target function, wherein the target engine has a plurality of target engines; in the case where a plurality of the target functions are included in each of the service engines, the service engine including all the target functions is determined as the target engine.
Optionally, the target functions are two, the two target functions are a first target function and a second target function, and when each service engine includes only one target function, determining, according to the target function and the function of each service engine, the service engine including the target function as the target engine, and determining, according to the order of implementation of the target functions, the execution order of each target engine includes: splitting the target external request into a first request and a second request according to the implementation sequence of a plurality of target functions, wherein the function to be called by the first request is the first target function, the function to be called by the second request is the second target function, and the implementation sequence is that the first target function is implemented before the second target function is implemented; determining a first one of the target engines from a plurality of the service engines according to the first target function and the function of each of the service engines, the first one of the target engines including the first target function; determining a second target engine from a plurality of service engines according to the second target function and the function of each service engine, wherein the function of the second target engine comprises the second target function; according to the implementation sequence, a first target engine is adopted to realize the first target function, and then a second target engine is adopted to realize the second target function.
Optionally, determining a target engine from a plurality of the service engines at least according to the target external request, including: acquiring an object code package, wherein the object code package is established based on the interface adaptation service, the object code package comprises a plurality of sub-code packages, and each sub-code package corresponds to one service engine; determining a target subcode packet according to the function to be called by the target external request; and determining the service engine corresponding to the target subcode packet as the target engine.
Optionally, controlling the interface of the target engine to receive the target external request includes: acquiring a standard access field of the target engine and a field name of the standard access field; acquiring a target field corresponding to the standard access field in the target external request, and acquiring a field name of the target field; establishing a mapping relation between the field name of the target field and the field name of the standard access field; and controlling an interface of the target engine to receive the target external request according to the standard access field, the target field and the mapping relation.
The embodiment of the invention provides a processor which is used for running a program, wherein the adaptation method of a service engine interface is executed when the program runs.
Specifically, the adaptation method of the service engine interface comprises the following steps:
step S201, receiving an external request sent by external equipment by adopting a target interface in a gateway, wherein the target interface is used for receiving a plurality of external requests, different initial protocols of the external requests are different, and the target interface is established based on an interface adaptation service;
specifically, for the definition of an abstract interface, a set of general interface standard is abstracted, external requests for calling different capabilities are combined into one interface, and the interface is distinguished through different types of fields and parameters, so that the interface is suitable for the requirements of calling AI capabilities in various scenes such as single, streaming, text, audio, video and the like. The gateway is also used for realizing functions of access, routing, authentication, verification and the like.
Step S202, converting an initial protocol of the external request into a target protocol based on the interface adaptation service to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different;
Specifically, the complexity is reduced by introducing the interface adaptation service, so that the aim of decoupling a service code (external request) and an interface code (service engine) is fulfilled, and data based on different multimedia protocols are converted into a unified data protocol, so that interaction with the engine is facilitated.
Step S203, at least according to the target external request, determining a target engine from a plurality of service engines, and controlling an interface of the target engine to receive the target external request, so that the target engine executes a function corresponding to the external request, where the target engine is the service engine for the function corresponding to the external request.
Specifically, according to different functions to be called by an external request, the combined call of different engines is provided, so that the service system can use the combination of the multi-mode capabilities more flexibly and conveniently, and the security of the service system call verification function is improved.
Optionally, based on the interface adaptation service, converting the initial protocol of the external request into a target protocol to obtain a target external request, including: acquiring an initial message format of the external request, wherein the initial message format of the external request is determined based on the initial protocol; analyzing the initial message format of the external request to obtain the data information of the external request; and repackaging the data information of the external request by adopting the target protocol so as to convert the initial protocol of the external request into the target protocol, thereby obtaining the target external request.
Optionally, determining a target engine from a plurality of the service engines at least according to the target external request, including: acquiring the functions of each service engine, wherein each service engine comprises one or more different functions; according to the target external request, determining the function to be called by the target external request as a target function, wherein the target function at least comprises one of the following steps: a voice recognition function, a semantic understanding function, a voice synthesis function, a face recognition function, a voiceprint recognition function and a fingerprint recognition function; one or more target engines are determined from a plurality of service engines according to the target functions and the functions of the service engines, wherein the functions of the target engines at least comprise one target function.
Optionally, the target functions are multiple, and determining one or more target engines from the multiple service engines according to the target functions and the functions of each service engine includes: in the case that only one kind of the target function is included in each service engine, determining the service engine including the target function as the target engine according to the target function and the function of each service engine, and determining the execution sequence of each target engine according to the implementation sequence of the target function, wherein the target engine has a plurality of target engines; in the case where a plurality of the target functions are included in each of the service engines, the service engine including all the target functions is determined as the target engine.
Optionally, the target functions are two, the two target functions are a first target function and a second target function, and when each service engine includes only one target function, determining, according to the target function and the function of each service engine, the service engine including the target function as the target engine, and determining, according to the order of implementation of the target functions, the execution order of each target engine includes: splitting the target external request into a first request and a second request according to the implementation sequence of a plurality of target functions, wherein the function to be called by the first request is the first target function, the function to be called by the second request is the second target function, and the implementation sequence is that the first target function is implemented before the second target function is implemented; determining a first one of the target engines from a plurality of the service engines according to the first target function and the function of each of the service engines, the first one of the target engines including the first target function; determining a second target engine from a plurality of service engines according to the second target function and the function of each service engine, wherein the function of the second target engine comprises the second target function; according to the implementation sequence, a first target engine is adopted to realize the first target function, and then a second target engine is adopted to realize the second target function.
Optionally, determining a target engine from a plurality of the service engines at least according to the target external request, including: acquiring an object code package, wherein the object code package is established based on the interface adaptation service, the object code package comprises a plurality of sub-code packages, and each sub-code package corresponds to one service engine; determining a target subcode packet according to the function to be called by the target external request; and determining the service engine corresponding to the target subcode packet as the target engine.
Optionally, controlling the interface of the target engine to receive the target external request includes: acquiring a standard access field of the target engine and a field name of the standard access field; acquiring a target field corresponding to the standard access field in the target external request, and acquiring a field name of the target field; establishing a mapping relation between the field name of the target field and the field name of the standard access field; and controlling an interface of the target engine to receive the target external request according to the standard access field, the target field and the mapping relation.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program stored in the memory and capable of running on the processor, wherein the processor realizes at least the following steps when executing the program:
step S201, receiving an external request sent by external equipment by adopting a target interface in a gateway, wherein the target interface is used for receiving a plurality of external requests, different initial protocols of the external requests are different, and the target interface is established based on an interface adaptation service;
step S202, converting an initial protocol of the external request into a target protocol based on the interface adaptation service to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different;
step S203, at least according to the target external request, determining a target engine from a plurality of service engines, and controlling an interface of the target engine to receive the target external request, so that the target engine executes a function corresponding to the external request, where the target engine is the service engine for the function corresponding to the external request.
The device herein may be a server, PC, PAD, cell phone, etc.
Optionally, based on the interface adaptation service, converting the initial protocol of the external request into a target protocol to obtain a target external request, including: acquiring an initial message format of the external request, wherein the initial message format of the external request is determined based on the initial protocol; analyzing the initial message format of the external request to obtain the data information of the external request; and repackaging the data information of the external request by adopting the target protocol so as to convert the initial protocol of the external request into the target protocol, thereby obtaining the target external request.
Optionally, determining a target engine from a plurality of the service engines at least according to the target external request, including: acquiring the functions of each service engine, wherein each service engine comprises one or more different functions; according to the target external request, determining the function to be called by the target external request as a target function, wherein the target function at least comprises one of the following steps: a voice recognition function, a semantic understanding function, a voice synthesis function, a face recognition function, a voiceprint recognition function and a fingerprint recognition function; one or more target engines are determined from a plurality of service engines according to the target functions and the functions of the service engines, wherein the functions of the target engines at least comprise one target function.
Optionally, the target functions are multiple, and determining one or more target engines from the multiple service engines according to the target functions and the functions of each service engine includes: in the case that only one kind of the target function is included in each service engine, determining the service engine including the target function as the target engine according to the target function and the function of each service engine, and determining the execution sequence of each target engine according to the implementation sequence of the target function, wherein the target engine has a plurality of target engines; in the case where a plurality of the target functions are included in each of the service engines, the service engine including all the target functions is determined as the target engine.
Optionally, the target functions are two, the two target functions are a first target function and a second target function, and when each service engine includes only one target function, determining, according to the target function and the function of each service engine, the service engine including the target function as the target engine, and determining, according to the order of implementation of the target functions, the execution order of each target engine includes: splitting the target external request into a first request and a second request according to the implementation sequence of a plurality of target functions, wherein the function to be called by the first request is the first target function, the function to be called by the second request is the second target function, and the implementation sequence is that the first target function is implemented before the second target function is implemented; determining a first one of the target engines from a plurality of the service engines according to the first target function and the function of each of the service engines, the first one of the target engines including the first target function; determining a second target engine from a plurality of service engines according to the second target function and the function of each service engine, wherein the function of the second target engine comprises the second target function; according to the implementation sequence, a first target engine is adopted to realize the first target function, and then a second target engine is adopted to realize the second target function.
Optionally, determining a target engine from a plurality of the service engines at least according to the target external request, including: acquiring an object code package, wherein the object code package is established based on the interface adaptation service, the object code package comprises a plurality of sub-code packages, and each sub-code package corresponds to one service engine; determining a target subcode packet according to the function to be called by the target external request; and determining the service engine corresponding to the target subcode packet as the target engine.
Optionally, controlling the interface of the target engine to receive the target external request includes: acquiring a standard access field of the target engine and a field name of the standard access field; acquiring a target field corresponding to the standard access field in the target external request, and acquiring a field name of the target field; establishing a mapping relation between the field name of the target field and the field name of the standard access field; and controlling an interface of the target engine to receive the target external request according to the standard access field, the target field and the mapping relation.
The application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with at least the following method steps:
step S201, receiving an external request sent by external equipment by adopting a target interface in a gateway, wherein the target interface is used for receiving a plurality of external requests, different initial protocols of the external requests are different, and the target interface is established based on an interface adaptation service;
step S202, converting an initial protocol of the external request into a target protocol based on the interface adaptation service to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different;
step S203, at least according to the target external request, determining a target engine from a plurality of service engines, and controlling an interface of the target engine to receive the target external request, so that the target engine executes a function corresponding to the external request, where the target engine is the service engine for the function corresponding to the external request.
Optionally, based on the interface adaptation service, converting the initial protocol of the external request into a target protocol to obtain a target external request, including: acquiring an initial message format of the external request, wherein the initial message format of the external request is determined based on the initial protocol; analyzing the initial message format of the external request to obtain the data information of the external request; and repackaging the data information of the external request by adopting the target protocol so as to convert the initial protocol of the external request into the target protocol, thereby obtaining the target external request.
Optionally, determining a target engine from a plurality of the service engines at least according to the target external request, including: acquiring the functions of each service engine, wherein each service engine comprises one or more different functions; according to the target external request, determining the function to be called by the target external request as a target function, wherein the target function at least comprises one of the following steps: a voice recognition function, a semantic understanding function, a voice synthesis function, a face recognition function, a voiceprint recognition function and a fingerprint recognition function; one or more target engines are determined from a plurality of service engines according to the target functions and the functions of the service engines, wherein the functions of the target engines at least comprise one target function.
Optionally, the target functions are multiple, and determining one or more target engines from the multiple service engines according to the target functions and the functions of each service engine includes: in the case that only one kind of the target function is included in each service engine, determining the service engine including the target function as the target engine according to the target function and the function of each service engine, and determining the execution sequence of each target engine according to the implementation sequence of the target function, wherein the target engine has a plurality of target engines; in the case where a plurality of the target functions are included in each of the service engines, the service engine including all the target functions is determined as the target engine.
Optionally, the target functions are two, the two target functions are a first target function and a second target function, and when each service engine includes only one target function, determining, according to the target function and the function of each service engine, the service engine including the target function as the target engine, and determining, according to the order of implementation of the target functions, the execution order of each target engine includes: splitting the target external request into a first request and a second request according to the implementation sequence of a plurality of target functions, wherein the function to be called by the first request is the first target function, the function to be called by the second request is the second target function, and the implementation sequence is that the first target function is implemented before the second target function is implemented; determining a first one of the target engines from a plurality of the service engines according to the first target function and the function of each of the service engines, the first one of the target engines including the first target function; determining a second target engine from a plurality of service engines according to the second target function and the function of each service engine, wherein the function of the second target engine comprises the second target function; according to the implementation sequence, a first target engine is adopted to realize the first target function, and then a second target engine is adopted to realize the second target function.
Optionally, determining a target engine from a plurality of the service engines at least according to the target external request, including: acquiring an object code package, wherein the object code package is established based on the interface adaptation service, the object code package comprises a plurality of sub-code packages, and each sub-code package corresponds to one service engine; determining a target subcode packet according to the function to be called by the target external request; and determining the service engine corresponding to the target subcode packet as the target engine.
Optionally, controlling the interface of the target engine to receive the target external request includes: acquiring a standard access field of the target engine and a field name of the standard access field; acquiring a target field corresponding to the standard access field in the target external request, and acquiring a field name of the target field; establishing a mapping relation between the field name of the target field and the field name of the standard access field; and controlling an interface of the target engine to receive the target external request according to the standard access field, the target field and the mapping relation.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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 Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
1) According to the adaptation method of the service engine interface, a target interface in a gateway is used for receiving external requests sent by external equipment, the target interface is used for receiving various external requests, different external requests have different initial protocols, and the target interface is established based on interface adaptation service; based on interface adaptation service, converting an initial protocol of an external request into a target protocol to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different; and determining a target engine from the plurality of service engines at least according to the target external requests, and controlling an interface of the target engine to receive the target external requests so that the target engine executes the functions corresponding to the external requests, wherein the target engine is the service engine for the functions corresponding to the external requests. The method and the system achieve the aim of decoupling external requests and engine interfaces based on interface adaptation service, convert external request data based on different multimedia protocols into a unified data protocol, facilitate interaction with an engine, and solve the problems that the existing engine interfaces are coupled with the external requests, so that service and capacity application is not flexible enough and the engine type selection cost is high.
2) The adaptation device of the service engine interface comprises a receiving unit, an adaptation unit and a determination unit, wherein the receiving unit is used for receiving external requests sent by external equipment by adopting a target interface in a gateway, the target interface is used for receiving a plurality of external requests, different initial protocols of the external requests are different, and the target interface is established based on interface adaptation service; the adaptation unit is used for adapting service based on the interface, converting an initial protocol of the external request into a target protocol to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different; the determining unit is used for determining a target engine from a plurality of service engines at least according to the target external request, controlling an interface of the target engine to receive the target external request so that the target engine executes a function corresponding to the external request, and enabling the target engine to be the service engine for the function corresponding to the external request. The method and the system achieve the aim of decoupling external requests and engine interfaces based on interface adaptation service, convert external request data based on different multimedia protocols into a unified data protocol, facilitate interaction with an engine, and solve the problems that the existing engine interfaces are coupled with the external requests, so that service and capacity application is not flexible enough and the engine type selection cost is high.
3) The adaptation system of the service engine interface of the application comprises: the gateway layer is used for providing a target interface to receive an external request sent by external equipment; the interface adaptation layer is used for providing interface adaptation service to convert the initial protocol of the external request received by the gateway layer into a target protocol so as to obtain a target external request; and the service engine is used for receiving the target external request by adopting an interface based on the target protocol and processing the target external request. The method and the system achieve the aim of decoupling external requests and engine interfaces based on interface adaptation service, convert external request data based on different multimedia protocols into a unified data protocol, facilitate interaction with an engine, solve the problems that the existing engine interfaces are coupled with the external requests, service and capacity are not flexible enough to apply, the engine type selection cost is high, integrate the dispersed capacity, enable the service to apply the capacity more flexibly and conveniently, enable technology and service experience to be accumulated as capacity to settle down, and form a long-lasting competitive advantage.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method of adapting a service engine interface, comprising:
receiving an external request sent by external equipment by adopting a target interface in a gateway, wherein the target interface is used for receiving a plurality of external requests, different initial protocols of the external requests are different, and the target interface is established based on an interface adaptation service;
converting an initial protocol of the external request into a target protocol based on the interface adaptation service to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different;
and determining a target engine from a plurality of service engines at least according to the target external request, and controlling an interface of the target engine to receive the target external request so that the target engine executes the function corresponding to the external request, wherein the target engine is the service engine for the function corresponding to the external request.
2. The adaptation method according to claim 1, wherein converting the initial protocol of the external request to a target protocol based on the interface adaptation service, to obtain a target external request, comprises:
Acquiring an initial message format of the external request, wherein the initial message format of the external request is determined based on the initial protocol;
analyzing the initial message format of the external request to obtain the data information of the external request;
and repackaging the data information of the external request by adopting the target protocol so as to convert the initial protocol of the external request into the target protocol, thereby obtaining the target external request.
3. The adaptation method according to claim 1, wherein determining a target engine from a plurality of said service engines based at least on said target external request, comprises:
acquiring the functions of each service engine, wherein each service engine comprises one or more different functions;
according to the target external request, determining the function to be called by the target external request as a target function, wherein the target function at least comprises one of the following steps: a voice recognition function, a semantic understanding function, a voice synthesis function, a face recognition function, a voiceprint recognition function and a fingerprint recognition function;
one or more target engines are determined from a plurality of service engines according to the target functions and the functions of the service engines, wherein the functions of the target engines at least comprise one target function.
4. A method of adapting according to claim 3, wherein there are a plurality of said target functions, and determining one or more of said target engines from a plurality of said service engines based on said target functions and the functions of each of said service engines, comprises:
in the case that only one kind of the target function is included in each service engine, determining the service engine including the target function as the target engine according to the target function and the function of each service engine, and determining the execution sequence of each target engine according to the implementation sequence of the target function, wherein the target engine has a plurality of target engines;
in the case where a plurality of the target functions are included in each of the service engines, the service engine including all the target functions is determined as the target engine.
5. The adaptation method according to claim 4, wherein the target functions are two, the two target functions are a first target function and a second target function, respectively, and in the case that only one of the target functions is included in each of the service engines, determining the service engine including the target function as the target engine according to the target function and the function of each of the service engines, and determining the execution order of each of the target engines according to the order of implementation of the target functions, comprises:
Splitting the target external request into a first request and a second request according to the implementation sequence of a plurality of target functions, wherein the function to be called by the first request is the first target function, the function to be called by the second request is the second target function, and the implementation sequence is that the first target function is implemented before the second target function is implemented;
determining a first one of the target engines from a plurality of the service engines according to the first target function and the function of each of the service engines, the first one of the target engines including the first target function;
determining a second target engine from a plurality of service engines according to the second target function and the function of each service engine, wherein the function of the second target engine comprises the second target function;
according to the implementation sequence, a first target engine is adopted to realize the first target function, and then a second target engine is adopted to realize the second target function.
6. The adaptation method according to claim 1, wherein determining a target engine from a plurality of said service engines based at least on said target external request, comprises:
Acquiring an object code package, wherein the object code package is established based on the interface adaptation service, the object code package comprises a plurality of sub-code packages, and each sub-code package corresponds to one service engine;
determining a target subcode packet according to the function to be called by the target external request;
and determining the service engine corresponding to the target subcode packet as the target engine.
7. The adaptation method according to claim 1, wherein controlling the interface of the target engine to receive the target external request comprises:
acquiring a standard access field of the target engine and a field name of the standard access field;
acquiring a target field corresponding to the standard access field in the target external request, and acquiring a field name of the target field;
establishing a mapping relation between the field name of the target field and the field name of the standard access field;
and controlling an interface of the target engine to receive the target external request according to the standard access field, the target field and the mapping relation.
8. An adaptation device of a service engine interface, comprising:
The receiving unit is used for receiving external requests sent by external equipment by adopting a target interface in the gateway, the target interface is used for receiving a plurality of external requests, the initial protocols of different external requests are different, and the target interface is established based on an interface adaptation service;
the adaptation unit is used for adapting the service based on the interface, converting the initial protocol of the external request into a target protocol to obtain a target external request, wherein the target protocol is a protocol which can be identified by each service engine, the service engines corresponding to the external requests with different initial protocols are different, and the interface types of the service engines are different;
and the determining unit is used for determining a target engine from a plurality of service engines at least according to the target external request, controlling an interface of the target engine to receive the target external request so that the target engine executes the function corresponding to the external request, and enabling the target engine to be the service engine for the function corresponding to the external request.
9. An adaptation system for a service engine interface, comprising:
the gateway layer is used for providing a target interface to receive an external request sent by external equipment;
The interface adaptation layer is used for providing interface adaptation service to convert the initial protocol of the external request received by the gateway layer into a target protocol so as to obtain a target external request;
and the service engine is used for receiving the target external request by adopting an interface based on the target protocol and processing the target external request.
10. An electronic device, comprising: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising an adaptation method for performing the service engine interface of any of claims 1-7.
CN202310678248.2A 2023-06-08 2023-06-08 Service engine interface adapting method, adapting device and adapting system Pending CN116743880A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310678248.2A CN116743880A (en) 2023-06-08 2023-06-08 Service engine interface adapting method, adapting device and adapting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310678248.2A CN116743880A (en) 2023-06-08 2023-06-08 Service engine interface adapting method, adapting device and adapting system

Publications (1)

Publication Number Publication Date
CN116743880A true CN116743880A (en) 2023-09-12

Family

ID=87918026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310678248.2A Pending CN116743880A (en) 2023-06-08 2023-06-08 Service engine interface adapting method, adapting device and adapting system

Country Status (1)

Country Link
CN (1) CN116743880A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117555230A (en) * 2024-01-11 2024-02-13 深圳市东莱尔智能科技有限公司 IO module multi-adapter control method and device and multi-channel IO module

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117555230A (en) * 2024-01-11 2024-02-13 深圳市东莱尔智能科技有限公司 IO module multi-adapter control method and device and multi-channel IO module
CN117555230B (en) * 2024-01-11 2024-03-19 深圳市东莱尔智能科技有限公司 IO module multi-adapter control method and device and multi-channel IO module

Similar Documents

Publication Publication Date Title
CN109542457B (en) Distributed application distribution and deployment system and method for edge computing network
US10942786B2 (en) Network management
CN113342478B (en) Resource management method, device, network system and storage medium
CN101741850B (en) Multitask concurrent executive system and method for hybrid network service
CN113676512B (en) Network system, resource processing method and equipment
CN113301102A (en) Resource scheduling method, device, edge cloud network, program product and storage medium
CN116743880A (en) Service engine interface adapting method, adapting device and adapting system
CN111552568B (en) Cloud service calling method and device
NL2033580B1 (en) End-to-end network slicing (ens) from ran to core network for nextgeneration (ng) communications
CN113382033B (en) Central control adaptation method, device, equipment and storage medium
CN112243016B (en) Middleware platform, terminal equipment, 5G artificial intelligence cloud processing system and processing method
US10855541B2 (en) Methods and apparatuses for moving virtualized network function instances between network service instances
Bolettieri et al. Towards end-to-end application slicing in multi-access edge computing systems: Architecture discussion and proof-of-concept
CN105049402A (en) Method and apparatus for the transmission and adaptation of data, computer program, software product and digital storage medium for providing and adapting data
CN111356182A (en) Resource scheduling and processing method and device
US20230362683A1 (en) Operator platform instance for mec federation to support network-as-a-service
CN115604199B (en) Service routing method and system for cloud native platform micro-service gateway
CN113726547B (en) Network system, network configuration method and device
CN111628929A (en) Intelligent Internet of things information fusion gateway system and working method thereof
EP4340436A1 (en) Operation and maintenance method, apparatus, and system, server, electronic device, and medium
US9705742B2 (en) Method and apparatus for enabling M2M service and H2H service to coexist
WO2023081202A1 (en) Mec dual edge apr registration on behalf of edge platform in dual edge deployments
CN110990146A (en) Load balancing method, device, system and storage medium
Da et al. Future service provision: Towards a flexible hybrid service supporting platform
Femminella et al. An edge abstraction layer enabling federated and hierarchical orches‑tration of CCAM services in 5G and beyond net‑works

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination