[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113326060A - Service request processing method, device and system and service configuration method and device - Google Patents

Service request processing method, device and system and service configuration method and device Download PDF

Info

Publication number
CN113326060A
CN113326060A CN202010131356.4A CN202010131356A CN113326060A CN 113326060 A CN113326060 A CN 113326060A CN 202010131356 A CN202010131356 A CN 202010131356A CN 113326060 A CN113326060 A CN 113326060A
Authority
CN
China
Prior art keywords
container
service
interface
operation unit
identification information
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
CN202010131356.4A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010131356.4A priority Critical patent/CN113326060A/en
Publication of CN113326060A publication Critical patent/CN113326060A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a service request processing method, a service request processing device, a service request processing system, a service configuration method and a service configuration device, and relates to the technical field of computers. One embodiment of the method comprises: acquiring a configuration file of a service; determining an interface of the service and identification information corresponding to the interface according to the configuration file; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container; and correspondingly storing the interface and the identification information in a configuration database. The implementation method can decouple the algorithm model and the service logic, reduce development cost and improve service processing efficiency.

Description

Service request processing method, device and system and service configuration method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for processing a service request, and a method and an apparatus for configuring a service.
Background
Algorithm models are widely used in various business processes.
In the prior art, an algorithm model is logically coupled with a service, and when the algorithm model corresponding to the service changes, a developer needs to rewrite a code.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, and a system for processing a service request, and a method and an apparatus for configuring a service, which can decouple an algorithm model and service logic, reduce development cost, and improve service processing efficiency.
In a first aspect, an embodiment of the present invention provides a service configuration method, including:
acquiring a configuration file of a service;
determining an interface of the service and identification information corresponding to the interface according to the configuration file; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container;
and correspondingly storing the interface and the identification information in a configuration database.
Preferably, the first and second electrodes are formed of a metal,
the obtaining of the configuration file of the service includes:
monitoring a service discovery system;
and if the configuration file in the service discovery system is changed, acquiring the configuration file from the service discovery system.
Preferably, the first and second electrodes are formed of a metal,
determining the interface of the service and the identification information corresponding to the interface according to the configuration file includes:
analyzing the configuration file to obtain the identification information, and operation flow information and operation unit information corresponding to the identification information;
creating an operation unit according to the operation unit information; wherein, the operation unit comprises: an identification of the container;
and according to the operation flow information, packaging the operation unit into the interface.
In a second aspect, an embodiment of the present invention provides a method for processing a service request, including:
receiving a service request sent by a service party; wherein, the service request includes: identification information corresponding to the parameters and the interfaces;
acquiring the interface from a configuration database according to the identification information; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container;
transmitting the parameters into the interface so that the interface sends the parameters to the container according to the identifier of the container, and outputting a calling result according to a calculation result fed back by the container; wherein the calculation is determined by the container from the parameters and the algorithm model;
and determining a request result according to the calling result, and feeding back the request result to the service party.
Preferably, the first and second electrodes are formed of a metal,
the determining a request result according to the calling result comprises:
storing the calling result to the configuration database;
and sending the calling result stored in the configuration database to a vector database according to a data exchange tool, and receiving the request result fed back by the vector database.
Preferably, the first and second electrodes are formed of a metal,
the interface comprises n operating units, wherein n is an integer greater than or equal to 2; the operation unit has a corresponding execution order;
the interface sends the parameters to the container according to the identifier of the container, and outputs a calling result according to a calculation result fed back by the container, including:
the operation unit with the execution order ranked at the 1 st bit sends the parameters to the 1 st container according to the identifier of the 1 st container included in the operation unit, and the calculation result fed back by the 1 st container is input into the operation unit with the execution order ranked at the 2 nd bit;
the operation unit with the execution order ranked at the ith position sends the calculation result input by the operation unit with the execution order ranked at the (i-1) th position to the ith container according to the identification of the ith container included by the operation unit with the execution order ranked at the ith position, and inputs the calculation result fed back by the ith container into the operation unit with the execution order ranked at the (i + 1) th position;
the operation unit with the execution order arranged at the nth position sends the calculation result input by the operation unit with the execution order arranged at the (n-1) th position to the nth container according to the identifier of the nth container included by the operation unit, and outputs the calculation result fed back by the nth container; and the calculation result fed back by the nth container is the calling result, and i is an integer which is greater than 1 and less than n.
In a third aspect, an embodiment of the present invention provides a service configuration apparatus, including:
the acquisition module is configured to acquire a configuration file of a service;
the determining module is configured to determine an interface of the service and identification information corresponding to the interface according to the configuration file; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container;
and the storage module is configured to correspondingly store the interface and the identification information in a configuration database.
In a fourth aspect, an embodiment of the present invention provides a service request processing apparatus, including:
the receiving module is configured to receive a service request sent by a service party; wherein, the service request includes: identification information corresponding to the parameters and the interfaces;
the acquisition module is configured to acquire the interface from a configuration database according to the identification information; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container;
the calling module is configured to transmit the parameters to the interface, so that the interface sends the parameters to the container according to the identifier of the container, and outputs a calling result according to a calculation result fed back by the container; wherein the calculation is determined by the container from the parameters and the algorithm model;
and the determining module is configured to determine a request result according to the calling result and feed back the request result to the service party.
In a fifth aspect, an embodiment of the present invention provides a service request processing system, including: the service configuration apparatus according to the foregoing embodiment and the service request processing apparatus according to the foregoing embodiment.
In a sixth aspect, an embodiment of the present invention provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any of the embodiments described above.
In a seventh aspect, an embodiment of the present invention provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method described in any of the above embodiments.
One embodiment of the above invention has the following advantages or benefits: through the configuration file, the dynamic configuration of the service can be realized. The algorithm model is separated from the configuration file, so that the algorithm model is logically decoupled from the service, when the algorithm model corresponding to the service is changed, codes do not need to be re-developed, development cost is reduced, and service request processing efficiency is improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a flowchart of a service configuration method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a relationship among an operation unit, an interface, and a service according to an embodiment of the present invention;
FIG. 3 is a schematic view of a container provided in accordance with an embodiment of the present invention;
fig. 4 is a flowchart of a service request processing method according to an embodiment of the present invention;
fig. 5 is a flowchart of a service request processing method according to another embodiment of the present invention;
fig. 6 is a schematic diagram of a service configuration apparatus according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a service request processing apparatus according to an embodiment of the present invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 9 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, an embodiment of the present invention provides a service configuration method, including:
step 101: and acquiring a configuration file of the service.
Different service services can be provided through configuration files of different services. Such as payment services, image recognition services, image feature extraction services, etc.
The configuration file of the service can be uploaded by a service provider of the service, and can also be acquired from a service discovery system.
Step 102: determining an interface of a service and identification information corresponding to the interface according to the configuration file; wherein, the interface includes: an identification of the container; an algorithmic model is deployed in the container.
The identification information corresponding to the interface may include: the identity of the interface and the identity of the service to which the interface belongs. For example, if the identifier of the registration interface is a, and the service identifier to which the registration interface belongs is a, the identifier information corresponding to the registration interface is a and a. In the process of calling the interface, the called interface can be accurately determined through the identification information corresponding to the interface.
The embodiment of the invention relates the algorithm model and the interface through the identification of the container. An interface may include an identification of one or more containers. The identifier of the container may be a domain name corresponding to the container. The container can be packaged into an interface service through the mirror image container, and corresponding algorithm service is provided for the outside. The container is mounted under the domain name by mirroring the IP address of the container. One domain name can correspond to one or more mirror image containers corresponding to the containers, and when the calculated amount of one container is insufficient, the IP addresses of the mirror image containers of other containers can be mounted under the same domain name for load balancing. By adding the mirror image container of the mounted container under the domain name, the service request with larger operation amount can be processed, and the service processing capability is improved.
The algorithm model may be a visual target tracking algorithm, a regression algorithm model, or the like.
Step 103: and correspondingly storing the interface and the identification information in a configuration database.
And correspondingly storing the interfaces and the corresponding identification information so as to realize the calling of the corresponding interfaces according to the identification information.
The method can realize dynamic configuration of the service through the configuration file. The algorithm model is separated from the configuration file, so that the algorithm model is logically decoupled from the service, when the algorithm model corresponding to the service is changed, codes do not need to be re-developed, and the development cost is reduced.
In an embodiment of the present invention, acquiring a configuration file of a service includes:
monitoring a service discovery system;
and if the configuration file in the service discovery system is changed, acquiring the configuration file from the service discovery system.
The service discovery system may be an ETCD, a Consul, or the like. Wherein the ETCD is a distributed, consistent key-value storage system for shared configuration and service discovery; consul is service management software supporting distributed highly-available service discovery and configuration sharing in multiple data centers.
Taking the ETCD as an example, the service discovery system may include one or more servers in which the ETCD is built, and an ETCD service cluster formed by a plurality of servers has higher stability and reliability compared with a single server.
In the embodiment of the invention, the change of the configuration file refers to the modification and the increase of the configuration file, if the configuration file in the service discovery system is modified, the modified configuration file is obtained from the service discovery system; and if the configuration file is newly added in the service discovery system, acquiring the newly added configuration file from the service discovery system. In an actual application scenario, if it is monitored that the configuration file is deleted in the service discovery system, the interface corresponding to the configuration file and the identification information corresponding to the interface are deleted from the configuration database according to the identification of the deleted configuration file.
By monitoring the service discovery system, the information of the change of the configuration file can be acquired in time, and the configured service can be adjusted in time.
In an embodiment of the present invention, determining an interface of a service and identification information corresponding to the interface according to a configuration file includes:
analyzing the configuration file to obtain identification information, operation flow information and operation unit information corresponding to the identification information;
creating an operation unit according to the operation unit information; wherein, the operation unit includes: identification of the container.
And according to the operation flow information, packaging the operation unit into an interface.
One configuration file can generate at least one interface, and one interface comprises at least one operation unit. For example, service 1 corresponds to a search interface, and the search interface includes operation units including: detection, quality, characteristics, matching; the service 2 corresponds to a registration interface and a search interface, wherein the search interface is the same as the search interface of the service 1, and the registration interface comprises an operation unit which comprises: detection, living, characterization, identification.
One operation unit corresponds to one algorithm model, for example, the detection unit corresponds to the detection algorithm model, the identification unit corresponds to the identification algorithm model, and the attribute unit corresponds to the attribute algorithm model. The operation flow information includes information such as the logical order of each operation unit in the interface, for example, the output of the detection unit is the input of the quality unit, and the output of the quality unit is the input of the identification unit.
Fig. 2 is a schematic diagram illustrating the relationship among the operation units, the interfaces, and the services. The service comprises two interfaces, interface 1 and interface 2, wherein interface 1 comprises three operation units, and interface 2 comprises two operation units.
In one embodiment of the invention, an algorithmic model is deployed in the container, comprising:
the algorithm model is deployed in the container through TensorFlow Serving.
TensorFlow Serving is an open source service system, is suitable for deploying machine learning models, is flexible, high in performance and can be used in production environments.
As shown in fig. 3, is a schematic view of a container comprising: the system comprises a TensorFlow model, a TensorFlow Serving module and a Client module, wherein the Client module further comprises: the device comprises a prediction submodule, a preprocessing submodule and a service submodule, wherein the service submodule is used for interacting with an operation unit. The preprocessing submodule is used for converting the image, the text or other data sent by the operation unit into tensor. The predictor sub-module sends the tensor to the TensorFlowServing based on the gRPC. The gRPC is a high-performance, universal, open source RPC (Remote Procedure Call) framework.
As shown in fig. 4, an embodiment of the present invention provides a service request processing method, including:
step 401: receiving a service request sent by a service party; wherein, the service request includes: and identification information corresponding to the parameters and the interfaces.
The business party may be a business system that needs to invoke an interface. The parameter may be data such as a picture, text, etc. The service party can call a plurality of interfaces through one service request, and the called interfaces can belong to one service or different services.
For example, the identification information corresponding to the service request 1 includes: and if the corresponding parameter of the service A and the interface a is the picture 1, calling the interface a of the service A can be realized through the service request 1, and the picture 1 is the input parameter of the interface. The identification information corresponding to the service request 2 includes: the service A, an interface a corresponding to the service A, the service B and an interface B corresponding to the service B; the parameter corresponding to the interface a is the picture 1, and the parameter corresponding to the interface b is the picture 2. Calling an interface a of the service A and an interface B of the service B can be realized through the service request 2, and the access parameters are respectively picture 1 and picture 2.
Step 402: acquiring an interface from a configuration database according to the identification information; wherein, the interface includes: an identification of the container; an algorithmic model is deployed in the container.
The relationships between the services, the interfaces, and the operation units have been described in the foregoing embodiments, and are not described herein again.
Step 403: transmitting the parameters into an interface so that the interface sends the parameters to the container according to the identifier of the container and outputs a calling result according to a calculation result fed back by the container; wherein the calculation result is determined by the container according to the parameters and the algorithm model.
The interface may only include one operation unit, and in this case, the output result of the operation unit is the call result. The interface (or the operation unit) interacts with the container based on HTTP (Hyper Text transfer protocol) or gRPC.
Step 404: and determining a request result according to the calling result, and feeding back the request result to the service party.
In an actual application scenario, according to different services, the call results output by some interfaces may be directly used as request results, and the call results output by some interfaces need to be further processed to obtain the request results, which will be described in the following embodiments.
In the process of processing the service request, the corresponding algorithm model can be called to calculate according to the identifier of the container included in the interface, if the algorithm model corresponding to the interface is changed, only the identifier of the container in the interface needs to be changed, and codes do not need to be rewritten. The method can improve the processing efficiency of the service request.
In one embodiment of the present invention, determining the request result according to the call result includes:
storing the calling result to a configuration database;
and sending the calling result stored in the configuration database to the vector database according to the data exchange tool, and receiving a request result fed back by the vector database.
Taking an image identification service as an example, the calling result is the extracted features of the image to be identified, the features of the template image are stored in the vector database, and after the features of the image to be identified are input and exchanged to the vector database, the vector database obtains an identification result according to the features of the image to be identified and the features of the template image, and the identification result is a request result.
In one embodiment of the invention, the interface comprises n operation units, wherein n is an integer greater than or equal to 2; the operation unit has corresponding execution order;
the interface sends the parameter to the container according to the identifier of the container, and outputs a calling result according to a calculation result fed back by the container, wherein the calling result comprises the following steps:
the operation unit with the execution order ranked at the 1 st position sends the parameters to the 1 st container according to the identifier of the 1 st container included in the operation unit, and the calculation result fed back by the 1 st container is input into the operation unit with the execution order ranked at the 2 nd position;
the operation unit with the execution order ranked at the ith position sends the calculation result input by the operation unit with the execution order ranked at the (i-1) th position to the ith container according to the identification of the ith container included by the operation unit, and inputs the calculation result fed back by the ith container into the operation unit with the execution order ranked at the (i + 1) th position;
the operation unit with the execution order arranged at the nth position sends the calculation result input by the operation unit with the execution order arranged at the (n-1) th position to the nth container according to the identifier of the nth container included in the operation unit, and outputs the calculation result fed back by the nth container; and the calculation result fed back by the nth container is a calling result, and i is an integer which is greater than 1 and less than n.
Taking the search interface as an example, the search interface comprises the following operation units: detection, quality, features, matching. The execution order of the operation unit is 1, 2, 3, 4 respectively. The detection unit sends the parameters in the service request to the detection container and inputs the calculation result fed back by the detection container into the quality unit; the quality unit sends the calculation result input by the detection unit to the quality container, and inputs the calculation result fed back by the quality container to the characteristic unit; the characteristic unit sends the calculation result input by the quality unit to the characteristic container, and inputs the calculation result fed back by the characteristic container to the matching unit; and the matching unit sends the calculation result input by the characteristic unit to the matching container and outputs the calculation result fed back by the matching container.
In one embodiment of the invention, the method further comprises: the time taken by the container from the reception of the data sent by the corresponding operation unit to the output of the calculation result is determined, and the time is saved. The corresponding time of the container reflects the performance strength of the container, and the change of the performance of the container can be monitored through the time.
In one embodiment of the invention, the method further comprises: and if the connection between the operation unit and the algorithm model fails, sending an alarm signal. The alarm signal may be an alarm short message, or may be in other forms such as an alarm mail. The transmitted object can be a service party or a maintenance party of the service request processing device.
In one embodiment of the invention, the method further comprises: according to the input and output of the operation unit, a log of the operation unit is generated and stored. The log is saved to help the subsequent check of the operation condition of the operation unit.
As shown in fig. 5, an embodiment of the present invention provides a service request processing method, including:
step 501: listening for a service discovery system.
Step 502: and when the configuration file is newly added in the service discovery system, acquiring the configuration file from the service discovery system.
Step 503: and analyzing the configuration file to obtain the identification information, and the operation flow information and the operation unit information corresponding to the identification information.
Step 504: creating an operation unit according to the operation unit information; wherein, the operation unit includes: identification of the container.
Step 505: according to the operation flow information, the operation unit is packaged into an interface; wherein, the interface includes: an identification of the container; an algorithmic model is deployed in the container.
Step 506: and correspondingly storing the interface and the identification information in a configuration database.
Step 507: receiving a service request sent by a service party; wherein, the service request includes: and the parameters and the identification information corresponding to the target interface.
Step 508: acquiring a target interface from a configuration database according to the identification information; wherein, the target interface includes: an identification of the container; an algorithmic model is deployed in the container.
Step 509: transmitting the parameters into a target interface so that the target interface sends the parameters to the container according to the identifier of the container, and outputting a calling result according to a calculation result fed back by the container; wherein the calculation result is determined by the container according to the parameters and the algorithm model.
Step 510: and storing the calling result to a configuration database.
Step 511: and sending the calling result stored in the configuration database to the vector database according to the data exchange tool, and receiving a request result fed back by the vector database.
Step 512: and feeding back the request result to the service party.
The method decouples the service logic and the algorithm model, can realize the dynamic configuration of the service, reduces the development cost and improves the processing efficiency of the service request.
As shown in fig. 6, an embodiment of the present invention provides a service configuration apparatus, including:
an obtaining module 601 configured to obtain a configuration file of a service;
a determining module 602, configured to determine, according to the configuration file, an interface of the service and identification information corresponding to the interface; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container;
the storage module 603 is configured to store the interface and the identification information in the configuration database.
In an embodiment of the present invention, the obtaining module 601 is configured to monitor a service discovery system; and if the configuration file in the service discovery system is changed, acquiring the configuration file from the service discovery system.
In an embodiment of the present invention, the determining module 602 is configured to parse the configuration file to obtain the identification information, and the operation flow information and the operation unit information corresponding to the identification information; creating an operation unit according to the operation unit information; wherein, the operation unit includes: an identification of the container; and according to the operation flow information, packaging the operation unit into an interface.
In one embodiment of the invention, an algorithmic model is deployed in the container, comprising: the algorithm model is deployed in the container through TensorFlow Serving.
As shown in fig. 7, an embodiment of the present invention provides a service request processing apparatus, including:
a receiving module 701 configured to receive a service request sent by a service party; wherein, the service request includes: identification information corresponding to the parameters and the interfaces;
an obtaining module 702 configured to obtain an interface from a configuration database according to the identification information; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container;
the calling module 703 is configured to transmit the parameter into the interface, so that the interface sends the parameter to the container according to the identifier of the container, and outputs a calling result according to a calculation result fed back by the container; wherein the calculation result is determined by the container according to the parameters and the algorithm model;
and the determining module 704 is configured to determine a request result according to the calling result and feed the request result back to the service party.
In one embodiment of the invention, the determining module 704 is configured to store the call result to a configuration database; and sending the calling result stored in the configuration database to the vector database according to the data exchange tool, and receiving a request result fed back by the vector database.
In one embodiment of the invention, the interface comprises n operation units, wherein n is an integer greater than or equal to 2; the operation unit has corresponding execution order;
the interface sends the parameter to the container according to the identifier of the container, and outputs a calling result according to a calculation result fed back by the container, wherein the calling result comprises the following steps:
the operation unit with the execution order ranked at the 1 st position sends the parameters to the 1 st container according to the identifier of the 1 st container included in the operation unit, and the calculation result fed back by the 1 st container is input into the operation unit with the execution order ranked at the 2 nd position;
the operation unit with the execution order ranked at the ith position sends the calculation result input by the operation unit with the execution order ranked at the (i-1) th position to the ith container according to the identification of the ith container included by the operation unit, and inputs the calculation result fed back by the ith container into the operation unit with the execution order ranked at the (i + 1) th position;
the operation unit with the execution order arranged at the nth position sends the calculation result input by the operation unit with the execution order arranged at the (n-1) th position to the nth container according to the identifier of the nth container included in the operation unit, and outputs the calculation result fed back by the nth container; and the calculation result fed back by the nth container is a calling result, and i is an integer which is greater than 1 and less than n.
The embodiment of the invention provides a service request processing system, which comprises: a service configuration apparatus according to any of the above embodiments and a service request processing apparatus according to any of the above embodiments.
An embodiment of the present invention provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any of the embodiments described above.
An embodiment of the present invention provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method according to any of the above embodiments.
Fig. 8 shows an exemplary system architecture 800 of a service configuration method or a service request processing method or a service configuration apparatus or a service request processing apparatus to which an embodiment of the present invention may be applied.
As shown in fig. 8, the system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 serves to provide a medium for communication links between the terminal devices 801, 802, 803 and the server 805. Network 804 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 801, 802, 803 to interact with a server 805 over a network 804 to receive or send messages or the like. The terminal devices 801, 802, 803 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 801, 802, 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 805 may be a server that provides various services, such as a back-office management server (for example only) that supports shopping-like websites browsed by users using the terminal devices 801, 802, 803. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the service configuration method or the service request processing method provided by the embodiment of the present invention is generally executed by the server 805, and accordingly, the service configuration apparatus or the service request processing apparatus is generally disposed in the server 805.
It should be understood that the number of terminal devices, networks, and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, shown is a block diagram of a computer system 900 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are executed when the computer program is executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a sending module, an obtaining module, a determining module, and a first processing module. The names of these modules do not form a limitation on the modules themselves in some cases, and for example, the sending module may also be described as a "module sending a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
acquiring a configuration file of a service;
determining an interface of the service and identification information corresponding to the interface according to the configuration file; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container;
and correspondingly storing the interface and the identification information in a configuration database.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
receiving a service request sent by a service party; wherein, the service request includes: identification information corresponding to the parameters and the interfaces;
acquiring the interface from a configuration database according to the identification information; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container;
transmitting the parameters into the interface so that the interface sends the parameters to the container according to the identifier of the container, and outputting a calling result according to a calculation result fed back by the container; wherein the calculation is determined by the container from the parameters and the algorithm model;
and determining a request result according to the calling result, and feeding back the request result to the service party.
According to the technical scheme of the embodiment of the invention, the dynamic configuration of the service can be realized through the configuration file. The algorithm model is separated from the configuration file, so that the algorithm model is logically decoupled from the service, when the algorithm model corresponding to the service is changed, codes do not need to be re-developed, development cost is reduced, and service request processing efficiency is improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A method for service configuration, comprising:
acquiring a configuration file of a service;
determining an interface of the service and identification information corresponding to the interface according to the configuration file; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container;
and correspondingly storing the interface and the identification information in a configuration database.
2. The method of claim 1,
the obtaining of the configuration file of the service includes:
monitoring a service discovery system;
and if the configuration file in the service discovery system is changed, acquiring the configuration file from the service discovery system.
3. The method of claim 1 or 2,
determining the interface of the service and the identification information corresponding to the interface according to the configuration file includes:
analyzing the configuration file to obtain the identification information, and operation flow information and operation unit information corresponding to the identification information;
creating an operation unit according to the operation unit information; wherein, the operation unit comprises: an identification of the container;
and according to the operation flow information, packaging the operation unit into the interface.
4. A service request processing method is characterized by comprising the following steps:
receiving a service request sent by a service party; wherein, the service request includes: identification information corresponding to the parameters and the interfaces;
acquiring the interface from a configuration database according to the identification information; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container;
transmitting the parameters into the interface so that the interface sends the parameters to the container according to the identifier of the container, and outputting a calling result according to a calculation result fed back by the container; wherein the calculation is determined by the container from the parameters and the algorithm model;
and determining a request result according to the calling result, and feeding back the request result to the service party.
5. The method of claim 4,
the determining a request result according to the calling result comprises:
storing the calling result to the configuration database;
and sending the calling result stored in the configuration database to a vector database according to a data exchange tool, and receiving the request result fed back by the vector database.
6. The method of claim 4 or 5,
the interface comprises n operating units, wherein n is an integer greater than or equal to 2; the operation unit has a corresponding execution order;
the interface sends the parameters to the container according to the identifier of the container, and outputs a calling result according to a calculation result fed back by the container, including:
the operation unit with the execution order ranked at the 1 st bit sends the parameters to the 1 st container according to the identifier of the 1 st container included in the operation unit, and the calculation result fed back by the 1 st container is input into the operation unit with the execution order ranked at the 2 nd bit;
the operation unit with the execution order ranked at the ith position sends the calculation result input by the operation unit with the execution order ranked at the (i-1) th position to the ith container according to the identification of the ith container included by the operation unit with the execution order ranked at the ith position, and inputs the calculation result fed back by the ith container into the operation unit with the execution order ranked at the (i + 1) th position;
the operation unit with the execution order arranged at the nth position sends the calculation result input by the operation unit with the execution order arranged at the (n-1) th position to the nth container according to the identifier of the nth container included by the operation unit, and outputs the calculation result fed back by the nth container; and the calculation result fed back by the nth container is the calling result, and i is an integer which is greater than 1 and less than n.
7. A service provisioning apparatus, comprising:
the acquisition module is configured to acquire a configuration file of a service;
the determining module is configured to determine an interface of the service and identification information corresponding to the interface according to the configuration file; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container;
and the storage module is configured to correspondingly store the interface and the identification information in a configuration database.
8. A service request processing apparatus, comprising:
the receiving module is configured to receive a service request sent by a service party; wherein, the service request includes: identification information corresponding to the parameters and the interfaces;
the acquisition module is configured to acquire the interface from a configuration database according to the identification information; wherein, the interface includes: an identification of the container; an algorithm model is deployed in the container;
the calling module is configured to transmit the parameters to the interface, so that the interface sends the parameters to the container according to the identifier of the container, and outputs a calling result according to a calculation result fed back by the container; wherein the calculation is determined by the container from the parameters and the algorithm model;
and the determining module is configured to determine a request result according to the calling result and feed back the request result to the service party.
9. A service request processing system, comprising: a service provisioning apparatus as claimed in claim 7 and a service request handling apparatus as claimed in claim 8.
10. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
11. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202010131356.4A 2020-02-28 2020-02-28 Service request processing method, device and system and service configuration method and device Pending CN113326060A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010131356.4A CN113326060A (en) 2020-02-28 2020-02-28 Service request processing method, device and system and service configuration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010131356.4A CN113326060A (en) 2020-02-28 2020-02-28 Service request processing method, device and system and service configuration method and device

Publications (1)

Publication Number Publication Date
CN113326060A true CN113326060A (en) 2021-08-31

Family

ID=77412967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010131356.4A Pending CN113326060A (en) 2020-02-28 2020-02-28 Service request processing method, device and system and service configuration method and device

Country Status (1)

Country Link
CN (1) CN113326060A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116257286A (en) * 2023-03-13 2023-06-13 北京百度网讯科技有限公司 File processing method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809126A (en) * 2014-01-26 2015-07-29 北京理工大学 Business process engine system
US20160248640A1 (en) * 2015-02-19 2016-08-25 Red Hat, Inc. Container host discovery
CN105959138A (en) * 2016-04-29 2016-09-21 深圳前海大数点科技有限公司 Micro-service dynamic disposition system and method based on cloud calculation
CN106815027A (en) * 2017-01-22 2017-06-09 山东鲁能软件技术有限公司 A kind of high resiliency calculating platform for power network multidimensional business composite computing
CN109710383A (en) * 2018-12-29 2019-05-03 上海晏鼠计算机技术股份有限公司 A kind of method of intelligent algorithm containerization application
US20200037217A1 (en) * 2018-07-26 2020-01-30 EMC IP Holding Company LLC Sharing of context among base station nodes for mobility management in mobile communications network
CN110764769A (en) * 2019-10-21 2020-02-07 苏州思必驰信息科技有限公司 Method and device for processing user request

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809126A (en) * 2014-01-26 2015-07-29 北京理工大学 Business process engine system
US20160248640A1 (en) * 2015-02-19 2016-08-25 Red Hat, Inc. Container host discovery
CN105959138A (en) * 2016-04-29 2016-09-21 深圳前海大数点科技有限公司 Micro-service dynamic disposition system and method based on cloud calculation
CN106815027A (en) * 2017-01-22 2017-06-09 山东鲁能软件技术有限公司 A kind of high resiliency calculating platform for power network multidimensional business composite computing
US20200037217A1 (en) * 2018-07-26 2020-01-30 EMC IP Holding Company LLC Sharing of context among base station nodes for mobility management in mobile communications network
CN109710383A (en) * 2018-12-29 2019-05-03 上海晏鼠计算机技术股份有限公司 A kind of method of intelligent algorithm containerization application
CN110764769A (en) * 2019-10-21 2020-02-07 苏州思必驰信息科技有限公司 Method and device for processing user request

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
侯阔;殷晓磊;: "微服务架构在大数据管理平台中的应用", 建设科技, no. 19, 15 October 2018 (2018-10-15) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116257286A (en) * 2023-03-13 2023-06-13 北京百度网讯科技有限公司 File processing method and device, electronic equipment and storage medium
CN116257286B (en) * 2023-03-13 2023-09-15 北京百度网讯科技有限公司 File processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111045833B (en) Interface calling method and device
CN111460129A (en) Method and device for generating identification, electronic equipment and storage medium
CN110764769B (en) Method and device for processing user request
CN113076153B (en) Interface calling method and device
CN110704200A (en) Method and device for converting call interface
CN111767157A (en) Request processing method and device based on service grid
CN114979295B (en) Gateway management method and device
CN112947919A (en) Method and device for constructing service model and processing service request
CN114513552A (en) Data processing method, device, equipment and storage medium
CN113326060A (en) Service request processing method, device and system and service configuration method and device
CN118312076A (en) Map icon processing method and device, electronic equipment and computer readable medium
CN112214500A (en) Data comparison method and device, electronic equipment and storage medium
CN113973139B (en) Message processing method and device
CN111984616B (en) Method, device and system for updating shared file
CN113141403A (en) Log transmission method and device
CN113448652A (en) Request processing method and device
CN113760693A (en) Method and apparatus for local debugging of microservice systems
CN112559001A (en) Method and device for updating application
CN112783924A (en) Dirty data identification method, device and system
CN113779018B (en) Data processing method and device
CN113472565B (en) Method, apparatus, device and computer readable medium for expanding server function
CN113535163B (en) Method and device for generating message
CN109889590B (en) Message processing method, device, client and computer readable medium
CN113779018A (en) Data processing method and device
CN117201597A (en) Message processing method, device, electronic equipment and storage medium

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