WO2022062304A1 - 在容器云上部署图像识别服务的方法与设备 - Google Patents
在容器云上部署图像识别服务的方法与设备 Download PDFInfo
- Publication number
- WO2022062304A1 WO2022062304A1 PCT/CN2021/075492 CN2021075492W WO2022062304A1 WO 2022062304 A1 WO2022062304 A1 WO 2022062304A1 CN 2021075492 W CN2021075492 W CN 2021075492W WO 2022062304 A1 WO2022062304 A1 WO 2022062304A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- service
- target
- recognition
- business
- identification
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 117
- 238000000605 extraction Methods 0.000 claims abstract description 75
- 239000000463 material Substances 0.000 claims description 59
- 238000013507 mapping Methods 0.000 claims description 51
- 230000015654 memory Effects 0.000 claims description 44
- 239000000284 extract Substances 0.000 claims description 18
- 230000004044 response Effects 0.000 claims description 12
- 230000008569 process Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 11
- 238000004590 computer program Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 8
- 230000005291 magnetic effect Effects 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 230000001419 dependent effect Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000002085 persistent effect Effects 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 101100498818 Arabidopsis thaliana DDR4 gene Proteins 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005294 ferromagnetic effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000001902 propagating effect Effects 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Definitions
- the present application relates to the field of communications, and in particular, to a technology for deploying an image recognition service on a container cloud.
- image recognition services are usually deployed on physical servers or virtual machines (VMs), requiring manual operations to increase hardware server resources, install an operating system, and modify the configuration to start the service, adjust the capacity and load of the cluster, and sometimes even
- VMs virtual machines
- the service cluster needs to be restarted, and additional log and error collection methods need to be built to handle service restarts and error records.
- the processing capacity is not easy to expand.
- An object of the present application is to provide a method and device for deploying an image recognition service on a container cloud.
- a method for deploying an image recognition service on a container cloud comprising:
- a deployment file corresponding to the image recognition business service in the image recognition service is obtained, wherein the deployment file includes a service corresponding to each business service in the image recognition business service Name, image file address, number of container sets, configuration service address, the business services in the image recognition business service include at least one of the following: image recognition management service, front-end resource service, indexing service, at least one identification service, feature extraction service , account service, content management service, publishing service, image recognition API service, resource storage service;
- the configuration file contains the mapping relationship between the service names and service addresses of other business services that the business service depends on, so that the business service can be The mapping relationship calls other business services that the business service depends on;
- the image recognition business service deployed through the container cloud performs at least any one of the following:
- Receive an image publishing service request for a first identification map through the publishing service obtain the first identification map, and provide the first identification map to the indexing service; obtain the first identification map through the indexing service identification map, generate a first index file corresponding to the first identification map, and return the first storage address corresponding to the first index file to the publishing service; obtain the first storage address through the publishing service, providing the first storage address to a first identification service corresponding to a first atlas corresponding to the first identification map in the at least one identification service; obtaining the first storage through the first identification service address, load the first index file according to the first storage address; or,
- the service obtains the second identification service corresponding to the user atlas in the at least one identification service, and provides the to-be-identified picture and the second identification service to the feature extraction service; obtains the feature extraction service through the feature extraction service.
- the picture to be identified and the second identification service extract the feature information of the picture to be identified, and provide the feature information to the second identification service; obtain the feature information through the second identification service, Match the feature information with the index file currently loaded by the second identification service; if the matching is successful, obtain a second identification corresponding to the second index file that matches the feature information through the second identification service map information, and return the second recognition map information to the image recognition API service, obtain the second recognition map information through the image recognition API service, and obtain the second recognition map information from the basic service. the second AR material, and return the second AR material to the target application.
- a method for publishing images based on an image recognition service deployed on a container cloud wherein an image recognition business service corresponding to the image recognition service is deployed on the container cloud, and managed through the container
- the platform manages the image recognition business service, and the business services in the image recognition business service include at least one of the following: a front-end resource service, an indexing service, at least one identification service, a content management service, and a publishing service.
- Identify each business service in the business service create a container set on the container cloud according to the deployment file, and start the business service.
- the container set loads the configuration file corresponding to the business service, and the configuration file contains the dependencies of the business service.
- the method includes:
- an image recognition method based on an image recognition service deployed on a container cloud wherein an image recognition business service corresponding to the image recognition service is deployed on the container cloud, and managed through the container
- the platform manages the image recognition business service, and the business services in the image recognition business service include at least one of the following: at least one recognition service, feature extraction service, and image recognition API service.
- a business service create a container set on the container cloud according to the deployment file and start the business service, the container set loads the configuration file corresponding to the business service, and the configuration file contains the services of other business services that the business service depends on The mapping relationship between the name and the service address, so that the business service invokes other business services that the business service depends on according to the mapping relationship;
- the method includes:
- the target recognition service corresponding to the user atlas in the at least one recognition service is obtained from the database service in the basic service corresponding to the image recognition service through the image recognition API service, and the target recognition service of the service is extracted according to the feature.
- the service address provides the image to be recognized and the target recognition service to the feature extraction service;
- the API service obtains the target recognition map information, obtains the target AR material corresponding to the target recognition map information from the basic service, and returns the target AR material to the target application.
- a network device for deploying an image recognition service on a container cloud comprising:
- One module is used to obtain the deployment file corresponding to the image recognition business service in the image recognition service after the basic service in the image recognition service is deployed, wherein the deployment file contains each image recognition service in the image recognition service.
- the business services in the image recognition business service include at least one of the following: image recognition management service, front-end resource service, indexing service, at least one Recognition service, feature extraction service, account service, content management service, publishing service, image recognition API service, resource storage service;
- the first and second modules are used to create a container set on the container cloud according to the deployment file for each business service in the image recognition business service and start the business service, and configure the service according to the corresponding business service through the container set.
- the corresponding configuration file is loaded from the address, and the business service is managed through the container management platform.
- the business service invokes other business services on which the business service depends according to the mapping relationship;
- the image recognition business service deployed through the container cloud performs at least any one of the following:
- Receive an image publishing service request for a first identification map through the publishing service obtain the first identification map, and provide the first identification map to the indexing service; obtain the first identification map through the indexing service identification map, generate a first index file corresponding to the first identification map, and return the first storage address corresponding to the first index file to the publishing service; obtain the first storage address through the publishing service, providing the first storage address to a first identification service corresponding to a first atlas corresponding to the first identification map in the at least one identification service; obtaining the first storage through the first identification service address, load the first index file according to the first storage address; or,
- the service obtains the second identification service corresponding to the user atlas in the at least one identification service, and provides the to-be-identified picture and the second identification service to the feature extraction service; obtains the feature extraction service through the feature extraction service.
- the picture to be identified and the second identification service extract the feature information of the picture to be identified, and provide the feature information to the second identification service; obtain the feature information through the second identification service, Match the feature information with the index file currently loaded by the second identification service; if the matching is successful, obtain a second identification corresponding to the second index file that matches the feature information through the second identification service map information, and return the second recognition map information to the image recognition API service, obtain the second recognition map information through the image recognition API service, and obtain the second recognition map information from the basic service. the second AR material, and return the second AR material to the target application.
- a network device for image publishing based on an image recognition service deployed on a container cloud wherein an image recognition service corresponding to the image recognition service is deployed on the container cloud, and the container cloud is
- the management platform manages the image recognition business service, and the business services in the image recognition business service include at least one of the following: a front-end resource service, an indexing service, at least one identification service, a content management service, and a publishing service.
- a container set is created on the container cloud according to the deployment file and the business service is started.
- the container set loads the configuration file corresponding to the business service, and the configuration file contains the dependencies of the business service.
- the equipment includes:
- the second module is configured to receive an image publishing service request for a target recognition map through the publishing service, obtain the target recognition map, and provide the target recognition map to the indexing service according to the service address of the indexing service. ;
- the second module is configured to obtain the target identification map through the indexing service, generate a target index file corresponding to the target identification map, and return the target storage address corresponding to the target index file to the publishing service;
- the second and third modules are configured to obtain the target storage address through the publishing service, and provide the target storage address to the target recognition service corresponding to the target atlas set corresponding to the target recognition map in the at least one recognition service ;
- the second and fourth modules are configured to obtain the target storage address through the target identification service, and load the target index file according to the target storage address.
- a network device for image recognition based on an image recognition service deployed on a container cloud wherein an image recognition business service corresponding to the image recognition service is deployed on the container cloud, and an image recognition service corresponding to the image recognition service is deployed on the container cloud.
- the management platform manages the image recognition business service, and the business services in the image recognition business service include at least one of the following: at least one recognition service, feature extraction service, and image recognition API service.
- a container set is created on the container cloud according to the deployment file and the business service is started.
- the container set loads the configuration file corresponding to the business service, and the configuration file contains the configuration files of other business services that the business service depends on.
- the equipment includes:
- the 31 module is configured to receive, through the image recognition API service, an image recognition service request sent by a target application for a picture to be recognized, and obtain a user atlas corresponding to the to-be-recognized picture;
- the third and second modules are configured to obtain the target recognition service corresponding to the user atlas in the at least one recognition service from the database service in the basic service corresponding to the image recognition service through the image recognition API service, and according to The service address of the feature extraction service provides the to-be-recognized picture and the target recognition service to the feature extraction service;
- the third and third modules are used to obtain the picture to be recognized and the target recognition service through the feature extraction service, extract the feature information of the picture to be recognized, and extract the feature information according to the service address of the target recognition service. to provide said target identification service;
- the third and fourth modules are used to obtain the feature information through the target recognition service, and match the feature information with the index file currently loaded by the target recognition service;
- the three and five modules are used to obtain the target recognition map information corresponding to the target index file matching the feature information through the target recognition service if the matching is successful, and return the target recognition map information to the image recognition API service , obtain the target recognition map information through the image recognition API service, obtain the target AR material corresponding to the target recognition map information from the basic service, and return the target AR material to the target application.
- a device for deploying an image recognition service on a container cloud includes:
- memory arranged to store computer-executable instructions which, when executed, cause the processor to:
- a deployment file corresponding to the image recognition business service in the image recognition service is obtained, wherein the deployment file includes a service corresponding to each business service in the image recognition business service Name, image file address, number of container sets, configuration service address, the business services in the image recognition business service include at least one of the following: image recognition management service, front-end resource service, indexing service, at least one identification service, feature extraction service , account service, content management service, publishing service, image recognition API service, resource storage service;
- the configuration file contains the mapping relationship between the service names and service addresses of other business services that the business service depends on, so that the business service can be The mapping relationship calls other business services that the business service depends on;
- the image recognition business service deployed through the container cloud performs at least any one of the following:
- Receive an image publishing service request for a first identification map through the publishing service obtain the first identification map, and provide the first identification map to the indexing service; obtain the first identification map through the indexing service identification map, generate a first index file corresponding to the first identification map, and return the first storage address corresponding to the first index file to the publishing service; obtain the first storage address through the publishing service, providing the first storage address to a first identification service corresponding to a first atlas corresponding to the first identification map in the at least one identification service; obtaining the first storage through the first identification service address, load the first index file according to the first storage address; or,
- the service obtains the second identification service corresponding to the user atlas in the at least one identification service, and provides the to-be-identified picture and the second identification service to the feature extraction service; obtains the feature extraction service through the feature extraction service.
- the picture to be identified and the second identification service extract the feature information of the picture to be identified, and provide the feature information to the second identification service; obtain the feature information through the second identification service, Match the feature information with the index file currently loaded by the second identification service; if the matching is successful, obtain a second identification corresponding to the second index file that matches the feature information through the second identification service map information, and return the second recognition map information to the image recognition API service, obtain the second recognition map information through the image recognition API service, and obtain the second recognition map information from the basic service. the second AR material, and return the second AR material to the target application.
- an image publishing device based on an image recognition service deployed on a container cloud wherein an image recognition business service corresponding to the image recognition service is deployed on the container cloud, and managed through the container
- the platform manages the image recognition business service, and the business services in the image recognition business service include at least one of the following: a front-end resource service, an indexing service, at least one identification service, a content management service, and a publishing service.
- Identify each business service in the business service create a container set on the container cloud according to the deployment file, and start the business service.
- the container set loads the configuration file corresponding to the business service, and the configuration file contains the dependencies of the business service.
- the equipment includes:
- memory arranged to store computer-executable instructions which, when executed, cause the processor to:
- an image recognition device based on an image recognition service deployed on a container cloud wherein an image recognition business service corresponding to the image recognition service is deployed on the container cloud, and managed through the container
- the platform manages the image recognition business service, and the business services in the image recognition business service include at least one of the following: at least one recognition service, feature extraction service, and image recognition API service.
- a business service create a container set on the container cloud according to the deployment file and start the business service, the container set loads the configuration file corresponding to the business service, and the configuration file contains the services of other business services that the business service depends on The mapping relationship between the name and the service address, so that the business service invokes other business services that the business service depends on according to the mapping relationship;
- the equipment includes:
- a memory arranged to store computer-executable instructions which, when executed, cause the processor to perform the following operations:
- the target recognition service corresponding to the user atlas in the at least one recognition service is obtained from the database service in the basic service corresponding to the image recognition service through the image recognition API service, and the target recognition service of the service is extracted according to the feature.
- the service address provides the image to be recognized and the target recognition service to the feature extraction service;
- the API service obtains the target recognition map information, obtains the target AR material corresponding to the target recognition map information from the basic service, and returns the target AR material to the target application.
- a computer-readable medium storing instructions that, when executed, cause a system to:
- a deployment file corresponding to the image recognition business service in the image recognition service is obtained, wherein the deployment file includes a service corresponding to each business service in the image recognition business service Name, image file address, number of container sets, configuration service address, the business services in the image recognition business service include at least one of the following: image recognition management service, front-end resource service, indexing service, at least one identification service, feature extraction service , account service, content management service, publishing service, image recognition API service, resource storage service;
- the configuration file contains the mapping relationship between the service names and service addresses of other business services that the business service depends on, so that the business service can be The mapping relationship calls other business services that the business service depends on;
- the image recognition business service deployed through the container cloud performs at least any one of the following:
- Receive an image publishing service request for a first identification map through the publishing service obtain the first identification map, and provide the first identification map to the indexing service; obtain the first identification map through the indexing service identification map, generate a first index file corresponding to the first identification map, and return the first storage address corresponding to the first index file to the publishing service; obtain the first storage address through the publishing service, providing the first storage address to a first identification service corresponding to a first atlas corresponding to the first identification map in the at least one identification service; obtaining the first storage through the first identification service address, load the first index file according to the first storage address; or,
- the service obtains the second identification service corresponding to the user atlas in the at least one identification service, and provides the to-be-identified picture and the second identification service to the feature extraction service; obtains the feature extraction service through the feature extraction service.
- the picture to be identified and the second identification service extract the feature information of the picture to be identified, and provide the feature information to the second identification service; obtain the feature information through the second identification service, Match the feature information with the index file currently loaded by the second identification service; if the matching is successful, obtain a second identification corresponding to the second index file that matches the feature information through the second identification service map information, and return the second recognition map information to the image recognition API service, obtain the second recognition map information through the image recognition API service, and obtain the second recognition map information from the basic service. the second AR material, and return the second AR material to the target application.
- a computer-readable medium for storing instructions wherein an image recognition service corresponding to an image recognition service is deployed on the container cloud, and the image recognition service is processed through a container management platform.
- the business services in the image recognition business service include at least one of the following: front-end resource service, indexing service, at least one identification service, content management service, publishing service, for each service in the image recognition business service service, create a container set on the container cloud according to the deployment file and start the business service, the container set loads the configuration file corresponding to the business service, and the configuration file contains the service name and the service name of other business services that the business service depends on.
- the instruction when executed, causes the system to perform the following operations:
- a computer-readable medium for storing instructions wherein an image recognition service corresponding to an image recognition service is deployed on the container cloud, and the image recognition service is processed through a container management platform.
- the business services in the image recognition business service include at least one of the following: at least one recognition service, feature extraction service, image recognition API service, for each business service in the image recognition business service, according to the deployment file Create a container set on the container cloud and start the business service, the container set loads the configuration file corresponding to the business service, and the configuration file contains the service name and service address of other business services that the business service depends on. a mapping relationship, so that the business service invokes other business services on which the business service depends according to the mapping relationship;
- the instruction when executed, causes the system to perform the following operations:
- the target recognition service corresponding to the user atlas in the at least one recognition service is obtained from the database service in the basic service corresponding to the image recognition service through the image recognition API service, and the target recognition service of the service is extracted according to the feature.
- the service address provides the image to be recognized and the target recognition service to the feature extraction service;
- the portability and security of the image recognition service can be improved, and the container management platform is used to reduce deployment difficulty, increase deployment flexibility, and accelerate related products.
- the online speed can also solve the technical problem of rapid expansion of large-scale image recognition services, and realize the dynamic expansion of image recognition services.
- FIG. 1 shows a flowchart of a method for deploying an image recognition service on a container cloud according to an embodiment of the present application
- Fig. 2 shows the image recognition service architecture diagram of an example of the present application
- FIG. 3 shows a flowchart of a method for publishing images based on an image recognition service deployed on a container cloud according to an embodiment of the present application
- FIG. 4 shows a flowchart of an image recognition method based on an image recognition service deployed on a container cloud according to an embodiment of the present application
- FIG. 5 shows a structural diagram of a network device for deploying an image recognition service on a container cloud according to an embodiment of the present application
- FIG. 6 shows a structure diagram of a network device for image publishing based on an image recognition service deployed on a container cloud according to an embodiment of the present application
- FIG. 7 shows a structural diagram of a network device for image recognition based on an image recognition service deployed on a container cloud according to an embodiment of the present application
- FIG. 8 illustrates an exemplary system that may be used to implement various embodiments described in this application.
- the terminal, the device serving the network, and the trusted party all include one or more processors (for example, a central processing unit (CPU)), an input/output interface, a network interface, and RAM.
- processors for example, a central processing unit (CPU)
- CPU central processing unit
- RAM random access memory
- Memory may include non-persistent memory in computer-readable media, random access memory (RAM) and/or non-volatile memory, such as read only memory (ROM) or flash memory ( Flash Memory).
- RAM random access memory
- ROM read only memory
- Flash Memory Flash Memory
- Memory is an example of a computer-readable medium.
- Computer readable media includes both persistent and non-permanent, removable and non-removable media and can be implemented by any method or technology for storage of information.
- Information may be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, Phase-Change Memory (PCM), Programmable Random Access Memory (PRAM), Static Random-Access Memory (Static Random-Access Memory, SRAM), Dynamic Random Access Memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically-Erasable Programmable Read -Only Memory, EEPROM), flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD), or other optical storage , magnetic tape cartridges, magnetic tape-disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
- PCM Phase-Change Memory
- PRAM Programmable Random Access Memory
- SRAM Static
- the equipment referred to in this application includes, but is not limited to, user equipment, network equipment, or equipment formed by integrating user equipment and network equipment through a network.
- the user equipment includes, but is not limited to, any mobile electronic product that can perform human-computer interaction with the user (for example, human-computer interaction through a touchpad), such as a smart phone, a tablet computer, etc., and the mobile electronic product can use any operation. system, such as Android operating system, iOS operating system, etc.
- the network device includes an electronic device that can automatically perform numerical calculation and information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs) ), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Digital Signal Processor (DSP), embedded devices, etc.
- the network device includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud formed by a plurality of servers; here, the cloud is formed by a large number of computers or network servers based on cloud computing, Among them, cloud computing is a kind of distributed computing, a virtual supercomputer composed of a group of loosely coupled computer sets.
- the network includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a VPN network, a wireless ad hoc network (Ad Hoc network), and the like.
- the device may also be a program running on the user equipment, network equipment, or a device formed by user equipment and network equipment, network equipment, touch terminal or network equipment and touch terminal integrated through a network.
- FIG. 1 shows a flowchart of a method for deploying an image recognition service on a container cloud according to an embodiment of the present application, and the method includes steps S11 and S12.
- step S11 after the basic service in the image recognition service is deployed, a deployment file corresponding to the image recognition business service in the image recognition service is obtained, wherein the deployment file includes each of the image recognition business services.
- the business service in the image recognition business service includes at least one of the following: image recognition management service, front-end resource service, indexing service, at least one recognition service service, feature extraction service, account service, content management service, publishing service, image recognition API service, resource storage service; in step S12, for each business service in the image recognition business service, according to the deployment file in the container Create a container set on the cloud and start the business service, load the corresponding configuration file according to the configuration service address corresponding to the business service through the container set, and manage the business service through the container management platform, wherein the configuration file contains Contains the mapping relationship between the service names and service addresses of other business services that the business service depends on, so that the business service calls other business services that the business service depends on according to the mapping relationship; wherein, through the container cloud
- the deployed image recognition business service performs at least any one of the following: receiving an image publishing service request for a first recognition map through the publishing service, obtaining the first recognition map, and providing the first recognition map to The indexing service: obtaining the first identification map through the index
- containerization technology (docker) is used to support the creation and use of Linux containers. Docker utilizes resource separation mechanisms in the Linux kernel, such as cgroups, and Linux kernel namespaces (namespaces) to create independent containers (containers). ).
- Containerization is an approach to software development whereby an application or service, its dependencies, and its configuration (abstracted as a deployment manifest file) are packaged together as a container image, where a software container acts as the standard unit of software deployment.
- container management platforms including but not limited to Kubernetes (K8s), Swam, Meso, etc., where Kubernetes provides a framework for running distributed systems elastically, in the context of Kubernetes as an example for container management platforms described) for deploying, scaling, and managing containerized applications, so groups of hosts running Linux containers can be clustered together, efficiently managed by Kubernetes, and available across public clouds, Private or hybrid cloud deployment hosts.
- Kubernetes consists of a set of nodes, which can be physical hosts or virtual machines.
- the Kubernetes platform runs on these nodes to form a cluster.
- a Kubernetes cluster consists of a Master Node (host node) and a worker Node (node) for the actual deployed Pods.
- a cluster is often composed of multiple Master Nodes. These Master Nodes control all Nodes of the entire cluster, and all task assignments come from the Master Nodes.
- the Master Node controls the entire cluster, makes global decisions about the cluster (such as scheduling), and detects and responds to cluster events.
- Node is the real workload node in the K8s cluster.
- the K8s cluster shares the workload with multiple Nodes, and supports dynamic addition or deletion of Nodes in the cluster.
- Pod (container set) is assigned to a specific Node for execution, and contains a container group of one or more containers. All containers in the same container set share the same IP address, IPC, hostname, and other resources. Containers are subordinate to Pods. In running applications, libraries and their dependent microservices, containers are the lowest level. By binding an external IP, containers can be accessed by the external network.
- the Kubernetes master node accepts instructions from the outside, and then forwards the instructions to the affiliated Nodes (nodes), this switching work with a large number of services automatically determines the most suitable node for the task, and then The node allocates resources and assigns Pods (container sets) to complete task requests.
- each business service in the image recognition service is packaged in a docker image and runs in each Pod in Kubernetes.
- the container cloud platform combines container technology and container management platform in the cloud to provide a platform for building, publishing and running distributed applications, hereinafter referred to as container cloud.
- the container cloud runs on multiple sets of servers (for example, x64 servers, x86 servers), deploys multiple business services in the image recognition service on the container cloud, and uses Kubernetes to perform operations on the services deployed on the container cloud.
- the management of these business services in the image recognition service can solve the technical problem of rapid expansion of large-scale image recognition services, realize the load balancing and dynamic expansion of image recognition services, solve the problem of differences in the deployment of different systems and different hardware environments, and improve the service quality. Portability and security, reduce deployment difficulty, increase deployment flexibility, and accelerate the launch of related products.
- the basic services in the image recognition service include at least one of the following: database, cache database, file storage, configuration, image repository, configuration editor and other related basic services
- the basic services can be deployed On the container cloud, it can also be deployed on the periphery of the container cloud (eg, on an external entity cloud server).
- the basic service is deployed on the periphery of the container cloud.
- k8s obtains a deployment file corresponding to the image recognition business service in the image recognition service.
- the deployment file is the basic file for starting the image recognition service, and k8s is specified in it.
- the required basic content such as specifying the service name of each business service in the image recognition business service, the image file address, the number of container sets, and the environment variables when the container set is running (such as the address of the configuration service, etc.) in the deployment file,
- the configuration item key can also be specified in the environment variable, and further, the content of the service (SVC) of each business service (including the exposed port and other content) can also be specified in the deployment file, and k8s is created according to the deployment file.
- SVC content of the service
- the image recognition business service includes at least one of the following: image recognition management service, front-end resource service, indexing service, recognition service, feature extraction service, account service , content management service, publishing service, image recognition API service, resource storage service, wherein, there may be one or more deployment files, which are not limited here.
- each business service corresponds to the same configuration service address, and in other embodiments, each business service corresponds to a different configuration service address, which is not limited herein. There is no restriction on the deployment sequence of different business services here.
- the image recognition management service is used to perform service control, such as controlling the allocation of recognition servers, and the like.
- the front-end resource service is used to manage the back-end or the front-end of the web page, and is also an entry service included in the corresponding client.
- the image recognition business service includes a second layer service that depends on the basic service and a first layer service that depends on the second layer service, wherein the second layer service
- the service is used to provide services that are biased towards the underlying algorithm function type (such as at least one service such as indexing service, identification service, feature extraction service, etc.), and has little relevance to specific business logic.
- the first layer service is used to provide Services that are biased towards upper-level business logic types (such as at least one service such as account service, content management service, publishing service, image recognition API service, etc.) are closely related to specific business logic.
- First-tier services and second-tier services are divided according to business logic, which does not mean that there is hierarchical division in deployment, but is only used to facilitate understanding of business logic.
- Dependency means that the relying party directly or indirectly uses or invokes or updates the data, functions, interfaces, etc. of the relying party.
- the publishing service in the first-tier service needs to call the indexing service in the second-tier service; for example, the first-tier service
- the content management service in the service updates the database content in the base service, etc.
- Figure 2 is a service architecture diagram of an example of the application, in which all business services and configuration editors are stored in the mirror warehouse, the mirror address is configured after the service is created in the container cloud, and the corresponding configuration is obtained from the configuration service (etcd) after the service is started.
- the cluster service entrance is the front-end resource service (webhiar), and the service request is forwarded to the account service (accountsrv), content management service (contentsrv), publishing service (publishsrv),
- the first layer of services such as image recognition API service (recognizesrv), the first layer depends on indexing services (including cloud indexing service (cloudkey), local indexing service (localkey)), recognition service (searchsrv), feature extraction service (featuresrv) and other third-level services.
- the second-tier service relies on basic services such as database service mysql, file storage service fastdfs, and resource storage service (storagesrv).
- webhiar is used as the access entry, which is used to deploy the entry service of the API in the management background or the front end of the web page.
- the access of the application and the API request of the application end are all entrances from this node. When concurrent access occurs, it can be deployed on the server.
- different services in the architecture can expand nodes according to the pressure of different requests. It should be noted that, the various services involved in the above will be described in detail in subsequent embodiments. In some embodiments, by deploying the image recognition service on a container cloud, the portability and security of the image recognition service can be improved.
- a container is created on the container cloud according to deployment information such as the service name, image file address, number of container sets, etc. corresponding to each business service in the deployment file set and start the business service, the container set loads the configuration file corresponding to the business service from the configuration service according to the configuration service address in the deployment file (for example, the configuration service includes a plurality of configuration files corresponding to different business services respectively , you can find the configuration file corresponding to the business service in the configuration service through the service name of the business service and load it), and use the container management platform (for example, k8s) to identify at least one of the deployed images on the container cloud. Services are managed.
- deployment information such as the service name, image file address, number of container sets, etc. corresponding to each business service in the deployment file set and start the business service
- the container set loads the configuration file corresponding to the business service from the configuration service according to the configuration service address in the deployment file (for example, the configuration service includes a plurality of configuration files corresponding to different business services respectively , you can find the configuration
- a configuration file needs to be loaded when the business service is started, and the configuration file contains the content required by the business service when it runs, usually including the port number occupied by the business service, the database address of the connection, the address of the cache server, dependencies (need to call ) and other information about the service address of other business services.
- K8S creates a container set corresponding to the business service and the number of container sets on the container cloud according to the number of container sets corresponding to the business service in the deployment file, and according to the image file corresponding to the business service in the deployment file address, download the image file corresponding to the business service, start the business service on the container set according to the image file, and then set the environment variable according to the deployment file, and the container set reads the configuration service set in the environment variable. address, load the configuration file corresponding to the business service from the configuration service, and complete the startup of the business service according to the content of the configuration file, and then the business service can process the business request.
- the basic service if the basic service is deployed on the container cloud, at least one of the basic service and the image recognition business service deployed on the container cloud can be managed through the container management platform. In other embodiments, if the basic service is deployed on the peripheral service of the container cloud, at least one service among the image recognition business services deployed on the container cloud can be managed through the container management platform.
- the k8s master node Master Node accepts instructions from the outside, and then forwards the instructions to the attached Node (node), and then allocates resources on the node and assigns Pod (container set) to complete the task request.
- each service is packaged in a docker image and runs in each Pod in k8s.
- using k8s to manage the image recognition service deployed on the container cloud can solve the technical problem of rapid expansion of large-scale image recognition services, realize load balancing and dynamic expansion of image recognition services, reduce deployment difficulty, and increase Deployment flexibility to accelerate the launch of related products.
- the configuration file includes a mapping relationship between service names and service addresses of other business services that the business service depends on, so that the business service can call other services that the business service depends on according to the mapping relationship.
- the configuration file corresponding to the publishing service contains the mapping relationship between the service name of the indexing service and the indexing service address and other services.
- the second layer service includes at least one of the following:
- the indexing service is a cloud indexing service (cloudkey), or a local indexing service (localkey), or includes both a cloud indexing service and a local indexing service;
- the cloud indexing service is used to generate cloud-identified images of images.
- the index file is used to identify the application in the cloud;
- the local index service is used to generate the index file required for the local identification and used for the local identification application.
- the index refers to the feature of the extracted picture.
- the indexing service accepts an index identification request, generates an index through a local index and a cloud index, saves the index file to the file storage service, and returns a storage address.
- the identification service (searchsrv) is used to provide the basic service and core service of the image identification algorithm.
- the identification service accepts the identification request, retrieves the index file stored in the identification library of the local machine, and returns identification information (eg, ID) of the successfully matched identification picture.
- the feature extraction service (featuresrv) is a pre-service during recognition, and is used to extract the features of the recognized picture.
- second-layer services there may be one or more second-layer services, which can be dynamically expanded according to the pressure and traffic conditions requested by the client. It should be noted that the above-mentioned second-layer service is only an example, rather than a limitation of the present application.
- the first-tier service includes at least one of the following:
- the content management service (contentsrv) is used to provide relevant management services for identifying gallery, AR material and AR scene.
- the content management service includes application management, resource management, atlas management, and AR scene management, and may also include binding the identification picture to the AR material.
- the publishing service is a management service for publishing pictures to the identification service, and is used to control the publishing of the atlas, and belongs to the core service.
- the publishing service manages and allocates existing recognition servers, accepts a request for publishing pictures, calls an index generation module, and allocates recognition servers, so that the recognition server calls a corresponding index loading module to load the index file .
- the image recognition API service (recognizesrv) provides API interface services such as client image recognition, resource acquisition, and local recognition index file download.
- the image recognition API service is used to: call a publishing management service to obtain recognition server information; call an image recognition service to retrieve pictures, obtain a recognition interface, query data, and return AR materials corresponding to the images.
- the account service is used to provide services related to account management, such as managing user and enterprise-related information.
- the basic service includes at least one of the following:
- the configuration service (etcd) is used to provide the configuration of the corresponding service.
- the configuration service is a distributed and consistent KV storage system for shared configuration and service discovery, and the configuration of the corresponding service can be modified and created through the management page of the configuration service.
- the service architecture of the present application employs a shared configuration service.
- the database service is used to store the data of the system.
- the database service can use a relational database to store text data in the form of two-dimensional tables, including but not limited to the mysql database.
- this application includes, but is not limited to, four databases: an account database, a content database, a publication database, and an identification server database.
- the account database saves user and enterprise information, etc.
- the content database includes atlas, attribute information of pictures (picture ID, name, atlas, size, type, release status, belonging user, etc.), AR effect binding information, resources Information (video, music, model, etc.), etc.
- the publishing database stores the publishing server information and picture publishing information, including picture ID, atlas, index file address, corresponding identification server, etc.
- the identification server database generates a A record table, including the ID of the loaded identification map, the address of the index file, the atlas, the release time, etc.
- one or more databases may be established to store the above information, which is not limited here.
- the file storage service is used to provide services related to the storage of files (eg, picture files, index files, videos, music, models, and other resource files).
- the file storage service includes, but is not limited to, any service related to file storage, such as fastdfs.
- the cache database service may be redis (Remote Dictionary Server).
- the image warehouse service (harbor) is used to provide services of image storage and distribution.
- the configuration editor service (etcdkeeper) is used to provide an application configuration file editing service.
- the base service can run inside the container cloud, or it can run on the periphery of the container cloud. In some embodiments, the base service can be dynamically expanded. It should be noted that the above basic services are only examples, rather than limitations of this application.
- the method further includes deploying a resource storage service (storagesrv) on the container cloud.
- the resource storage service is used to provide an intermediate service for file storage, encapsulates a standard storage interface to other services, and can be connected to multiple storage services later.
- the resource storage service is equivalent to an adapter for adapting to different file storage formats.
- the resource storage service needs to be deployed inside the container cloud, and cannot be deployed outside the container cloud.
- creating a container set on the container cloud according to the deployment file and starting the business service includes: for each business service in the image recognition business service a business service, according to the number of container sets corresponding to the business service in the deployment file, create a container set corresponding to the business service and the number of container sets on the container cloud, and according to the number of container sets corresponding to the business service in the deployment file Image file address, download the image file corresponding to the business service, and start the business service on the container set according to the image file.
- the container set also needs to load a configuration file to complete the starting of the identification service.
- the image recognition management service is used to manage the at least one recognition service; wherein the method further comprises: for each recognition service of the at least one recognition service, when the recognition service is started , send registration information to the image recognition management service according to the domain name information and/or address information of the image recognition management service; receive the registration information through the image recognition management service, and generate the recognition service according to the registration information and store the relevant information of the identification service in the database service in the basic service.
- each recognition service will record the domain name information and/or address information of the image recognition management service.
- the identification management service sends registration information including identification information of the identification service (eg, ID, name, address of the identification service), and informs the image identification management service that the identification service is available, and the image identification management service receives the registration information, and write the registration information into the database service in the basic service, and generate the relevant information of the identification service in the database service (for example, the ID of the currently loaded identification map, index file address, atlas, release time, etc.),
- the subsequent image recognition management service will regularly monitor the operation of all activated recognition services. When the machine is down, it will search and obtain the relevant information of the downtime identification service from the database service according to the identification information of the downtime identification service.
- the method further includes: for each activated recognition service in the at least one recognition service, periodically sending heartbeat information to the image recognition management service through the activated recognition service;
- the image recognition management service does not receive the heartbeat information sent by the third recognition service in the at least one recognition service within a predetermined time interval, then the fourth recognition service is determined in the at least one recognition service, and the basic service is determined from the basic service.
- the database service in obtains the currently loaded atlas information corresponding to the third identification service, so as to load the atlas corresponding to the currently loaded atlas information in the fourth identification service.
- each recognition service periodically sends heartbeat information to the image recognition management service, so that the image recognition management service determines whether and when each recognition service fails or is down based on the heartbeat information, eg, each recognition service
- the service sends heartbeat information to the image recognition management service every predetermined time. If the image recognition management service receives the heartbeat information of a certain recognition service, it can be determined that the recognition service is still running. If the image recognition management service does not receive the heartbeat information after a predetermined time The heartbeat information to an identification service indicates that the identification service is down.
- the image recognition management service may not receive the heartbeat information sent by the third recognition service within a predetermined time interval, it may be determined that the third recognition service is down, and the image recognition management service will retrieve the registered recognition service from the (The registered identification service may include the identification service that is newly started after the third identification service is down, and may also include the identification service that has been started before the third identification service is down.) Determine the fourth identification service, and then , the image recognition management service obtains the currently loaded atlas information corresponding to the third recognition service from the database service, and notifies the fourth recognition service to load the atlas corresponding to the currently loaded atlas information in the fourth recognition service, wherein the current The loaded atlas information can be any information related to identifying the atlas currently loaded by the service, for example, whether the atlas is currently loaded, the number of atlas currently loaded, the identification information of each atlas currently loaded, each atlas currently loaded Any information such as the identification images in the atlas and the number, the index file corresponding to the
- loading atlas in the context refers to one or more index files corresponding to one or more recognition maps in the recognition service loading atlas.
- Loading the atlas corresponding to the atlas information includes loading, in the fourth identification service, an index file corresponding to the identification graph in the atlas corresponding to the currently loaded atlas information.
- the determining a fourth identification service in the at least one identification service includes: if the image identification management service receives a message sent by a newly started fifth identification service in the at least one identification service registration information, and the fifth recognition service is determined as the fourth recognition service through the image recognition management service.
- the image recognition management service waits for the new recognition service to start and registers with the image recognition management service, and registers the new start
- the fifth recognition service is used as the fourth recognition service, and then the image recognition management service reads the currently loaded atlas information corresponding to the third recognition service from the database service, and notifies the fourth recognition service to load the current image in the fourth recognition service.
- the atlas corresponding to the atlas information For example, the registered recognition services in the image recognition management service include M1, M2, and M3. Each recognition service will send heartbeat information to the image recognition management service every 30 seconds.
- the image recognition management service determines that M1 is down; after that, if the image recognition management service receives the registration information sent by the newly started recognition service M4, the recognition service M4 is determined as the fourth recognition service, and then M4 loads M1
- the atlas corresponding to the currently loaded atlas information is loaded, for example, the index file corresponding to the identification map in the atlas corresponding to the currently loaded atlas information is loaded.
- the determining of a fourth recognition service among the at least one recognition service includes: obtaining, through the image recognition management service, each activated one of the at least one recognition service from the database service The currently loaded atlas information of the recognition service; the image recognition management service determines a fourth recognition service according to the currently loaded atlas information of each activated recognition service, wherein the fourth recognition service satisfies at least the following One item: currently no atlases are loaded; the least number of currently loaded atlases; the least number of recognized images in the currently loaded atlases.
- the currently loaded atlas information may be any information related to identifying the atlas currently loaded by the service, for example, whether the atlas is currently loaded, the number of currently loaded atlas, each currently loaded atlas , the identification information of each currently loaded atlas, and the number of identification images in each currently loaded atlas, the index file corresponding to the identification image in each currently loaded atlas, the address of the index file, and any other information.
- the registered recognition services in the image recognition management service include M1, M2, and M3. Each recognition service will send heartbeat information to the image recognition management service every 30 seconds.
- the image recognition management service determines that M1 is down, then obtains the currently loaded atlas information corresponding to the currently started M2 and M3 from the database service, and then selects the currently loaded atlas from M2 and M3.
- M3 is used as the fourth identification service, or M3 with a smaller number of identification images in the loaded atlas is selected as the fourth identification service.
- the method further includes: for the image service request to be processed, if the target business service corresponding to the image service request to be processed has been deployed on multiple container sets, using the container management platform according to the Load information of each container set in multiple container sets, determine a target container set from the multiple container sets, and process the to-be-processed image service request through the target business service deployed on the target container set.
- the image service request includes, but is not limited to, a publishing request for an image publishing service, a recognition request for an image recognition service, etc.
- each business service in multiple different business services can be deployed on a container set in the container cloud, or can be deployed in multiple different containers in the container cloud set.
- multiple business services for processing this image service request are obtained first.
- the load information can be the CPU load or memory load of the container set, and pass the target container set through the target container set.
- the business service deployed on the set is used to process this image service request, so as to achieve the purpose of load balancing.
- the image service request to be processed is a publishing request of an image publishing service.
- the request includes a publishing service, an indexing service, and an identification service. If the container set of the publishing service, the indexing service, and the identification service is deployed on the container cloud
- the numbers are two, three, and one, respectively, according to the load information of the two container sets where the publishing service is deployed, the target container set (target publishing service) with the smallest load information is determined.
- the target container set with the smallest load information
- process this publishing request through the target publishing service, target indexing service and identification service.
- the method further includes: monitoring, through the container management platform, the running status information of the created one or more container sets, and if the monitored load information of the target container set meets a predetermined capacity expansion condition, creating one or more container sets. multiple second target container sets, and deploy business services corresponding to the target container sets on the one or more second target container sets.
- the container management platform monitors the load information of each container set in one or more container sets that have been created on the container cloud, and if the monitored load information corresponding to a certain target container set satisfies a predetermined capacity expansion condition (For example, the load information corresponding to the target container set exceeds a predetermined load threshold), create one or more second target container sets, and deploy the business service corresponding to the target container set on the one or more second target container sets , thereby reducing the load on the target container set through automatic scaling.
- a predetermined capacity expansion condition For example, the load information corresponding to the target container set exceeds a predetermined load threshold
- a second target container set will be automatically expanded to deploy and run the business services corresponding to the target container set, so as to reduce the CPU load of the target container set and solve large-scale image problems. Identify technical issues with automatic scaling of services. If there are currently multiple identification requests for images to be identified, the feature extraction service is required to perform feature extraction on the multiple images to be identified. When the load information of the container set where the current feature extraction service is located meets the predetermined expansion conditions, the container management platform expands One or more container sets (each container set deploys a feature extraction service) and start one or more feature extraction services to process the feature extraction of multiple images to be identified, so as to achieve load balancing.
- the method further includes: in response to the expansion instruction for the target container set, creating one or more second target container sets through the container management platform, and creating one or more second target container sets in the one or more second target containers A business service corresponding to the target container set is deployed on the container set.
- the expansion instruction includes, but is not limited to, for which target container set (corresponding to the business service) the expansion operation is performed and for which target container set is expanded several second target container sets.
- one or more second target container sets are created on the container cloud, and the one or more second target container sets corresponding to the target container set are deployed on the one or more second target container sets business services, so as to reduce the load of the target container set through manual expansion, thereby solving the technical problem of rapid expansion of large-scale image recognition services.
- the method further includes: if the container management platform determines that the target user atlas satisfies a predetermined concurrent loading condition, determining one or more concurrent identification services corresponding to the target user atlas; Each of the one or more concurrent identification services loads the target user atlas respectively.
- a predetermined high concurrent loading condition eg, the concurrent access volume of the target user atlas exceeds a predetermined concurrent access volume threshold
- one or more concurrent identification services are allocated Loading the target user atlas at the same time can solve the problem of high concurrency of the specified atlas.
- the determining one or more concurrent identification services corresponding to the target user atlas includes: determining one corresponding to the target user atlas from identification services deployed in the at least one identification service or multiple concurrent recognition services.
- one or more concurrent identification services for loading the target user atlas are determined from at least one identification service currently deployed on the container cloud.
- the at least one identification service currently deployed on the container cloud may be The load status of each recognition service of , take one or more recognition services with smaller loads as concurrent recognition services, and load the target user atlas.
- one or more identification services with a smaller number of index files corresponding to the loaded identification diagram are used as concurrent identification services. , and load the target user atlas.
- the determining one or more concurrent identification services corresponding to the target user atlas includes: creating one or more second target container sets, in the one or more second target container sets One or more sixth identification services are respectively deployed on each second target container set, and the one or more sixth identification services are used as one or more concurrent identification services corresponding to the target user atlas.
- one or more second target container sets are created on the container cloud, and one or more sixth target container sets are respectively deployed on each of the one or more second target container sets.
- Identify the service use the one or more sixth identification services as concurrent identification services, and load the target user atlas, where only one sixth identification service may be deployed on each second target container set, or, it may also be A plurality of sixth identification services are respectively deployed on each second target container set.
- the method further includes dividing the target user atlas into a plurality of mutually disjoint subsets if the container management platform determines that the target user atlas satisfies a predetermined division condition, wherein the multiple Each of the subsets includes at least one identification map; determining one or more identification services corresponding to the target user atlas; respectively loading the plurality of subsets through each of the one or more identification services A subset of , where different identification services correspond to different subsets.
- the target user atlas if it is determined that the target user atlas satisfies a predetermined division condition (for example, the number of identification images in the target user atlas exceeds a predetermined number threshold), the target user atlas is divided into a plurality of mutually disjoint subsets, Each subset includes at least one identification map, and the container management platform determines that multiple identification services load a different subset respectively, so as to solve the problem that the number of atlas and pictures increases and the number of containers is insufficient.
- a predetermined division condition for example, the number of identification images in the target user atlas exceeds a predetermined number threshold
- the determining one or more identification services corresponding to the target user atlas includes: determining one or more identification services corresponding to the target user atlas from at least one deployed identification service ; In other embodiments, the determining one or more identification services corresponding to the target user atlas includes: creating one or more second target container sets, in the one or more second target containers One or more identification services are deployed on the set, and the one or more identification services are used as one or more identification services corresponding to the target user atlas.
- Fig. 3 shows a flowchart of an image publishing method based on an image recognition service deployed on a container cloud according to an embodiment of the present application, wherein an image recognition service corresponding to the image recognition service is deployed on the container cloud, and the The container management platform manages the image recognition business service, and the business services in the image recognition business service include at least one of the following: front-end resource service, indexing service, at least one identification service, content management service, and publishing service.
- the container set For each business service in the image recognition business service, create a container set on the container cloud according to the deployment file and start the business service, the container set loads the configuration file corresponding to the business service, and the configuration file contains the business service.
- step S21 receiving an image publishing service request for a target recognition map through the publishing service, obtaining the target recognition map, and providing the target recognition map to the indexing service according to the service address of the indexing service;
- step S22 the target identification map is obtained through the indexing service, a target index file corresponding to the target identification map is generated, and the target storage address corresponding to the target index file is returned to the publishing service;
- step S23 obtain the target storage address through the publishing service, and provide the target storage address to the target recognition service corresponding to the target atlas corresponding to the target recognition map in the at least one recognition service; in step S24 , obtain the target storage address through the target identification service, and load the target index file according to the target storage address.
- "publishing" in the context refers to adding an object recognition map to a recognition server or loading an index file corresponding to the object recognition map to the recognition server to provide retrieval.
- the user uploads the target recognition map in the front-end resource service interface, and performs a series of operations on the target recognition map, such as adding the target recognition map to an existing atlas or creating a new atlas and placing the material images in the new atlas , another example is to bind the target recognition map to an AR material, and the content management service obtains the target recognition map and the atlas information corresponding to the target recognition map in response to the relevant operation information performed by the user on the target recognition map.
- the image publishing service request is sent to the publishing service.
- the image publishing service request includes a target recognition map, wherein the target recognition map can be the target recognition map itself or the identification information of the target recognition map. , such as name, ID, etc.
- the image publishing service request may include, in addition to the target identification map, information of the atlas corresponding to the target identification map (for example, the identification of the atlas, etc.).
- the publishing service when the publishing service is started, a configuration file corresponding to the publishing service is loaded from the configuration service according to the configuration service address in the deployment file.
- the configuration file includes the service address of the indexing service on which the publishing service depends, and the publishing service receives After receiving the image publishing service request for the target recognition map, obtain the target recognition map corresponding to the image publishing service request (it can be the target recognition map itself, or the identification information of the target recognition map, such as name, ID, etc.), and according to the configuration file
- the service address of the indexing service in provides the target identification map or the identification information of the target identification map to the indexing service, and the local indexing service or cloud indexing service generates the index file corresponding to the target identification map (the local indexing service is used to generate the index of local identification.
- the cloud index service is used to generate the index file identified by the cloud, and the feature extraction algorithms corresponding to the two index services can be the same or different), the generated index file will be stored in the file storage service, and the index file corresponding to the index file will be stored.
- the address is returned to the publishing service, and the publishing service provides the storage address to the identification service corresponding to the atlas corresponding to the target identification map, and the identification service loads the corresponding index file from the file storage service to the memory according to the storage address of the index file to provide the target A recognition service that recognizes graphs.
- the relevant information corresponding to the target recognition map in the database service is updated, such as updating the publication status of the target recognition map, updating the recognition server information corresponding to the atlas corresponding to the target recognition map, etc. .
- the publishing service can obtain the atlas information corresponding to the target recognition map through the information contained in the image publishing service request, and can also obtain the information corresponding to the target recognition map through the publishing service to the database service.
- the information of the atlas is not limited here.
- the business service in the image recognition business service further includes an account service, and the account service is used to provide services related to account management, such as managing users, enterprise-related information, and the like.
- the method further includes, before the step S21: receiving, through the front-end resource service, the user's operation information on the target identification map, and forwarding the operation information to a content management service; through the content management The service obtains the target recognition map and the target atlas set corresponding to the target recognition map according to the operation information, and updates the relevant information of the target recognition map in the database service in the basic service corresponding to the image recognition service, An image publishing service request for the object recognition map is generated and sent to the publishing service.
- the user uploads the target recognition map in the front-end resource service interface, and performs a series of operations on the target recognition map, such as adding the target recognition map to an existing atlas or creating a new atlas and placing the target recognition map Enter the new atlas, or bind the target recognition map to an AR material
- the front-end resource service receives the relevant operation information performed by the user on the target recognition map, and forwards the relevant operation information to the content management service, the content management service According to the received relevant operation information, the target recognition map and the atlas corresponding to the target recognition image are obtained, and in some embodiments, the AR material bound to the target recognition map can also be obtained, and the target is updated in the database service accordingly.
- the related information includes any of the following: the identification information of the target recognition map, the storage address of the target recognition map, the identification information of the atlas corresponding to the target recognition map, the binding of the target recognition map
- the identification information of the AR material, the storage address of the AR material bound to the target recognition map, etc. generate an image publishing service request for the target recognition map and send it to the publishing service.
- the image publishing service request may only include an object identification map, wherein the object identification map may be the object identification map itself, or may be identification information of the object identification map, such as name, ID, and the like.
- the image publishing service request may also include the target identification map and the information of the atlas corresponding to the target identification map (for example, the identification of the atlas, etc.).
- the indexing service obtains the target identification map, generates a target index file corresponding to the target identification map, and returns the target storage address corresponding to the target index file to the publishing service, including: The indexing service obtains the target identification map, generates a target index file corresponding to the target identification map, and provides the target index file to the file storage service in the basic service; obtains the target index file through the file storage service. the target index file, store and obtain the target storage address corresponding to the target index file, and return the target storage address to the indexing service; obtain the target storage address through the indexing service, and store the target The address returned to the publishing service.
- the indexing service generates an index file corresponding to the target recognition picture after obtaining the target recognition map provided by the publishing service (which may be the target recognition map itself, or the identification information of the target recognition map, etc.)
- the index file is provided to the file storage service in the basic service for storage. After the index file is stored, the file storage service returns the corresponding storage address to the index service, and then the index service returns the storage address to the publishing service.
- the business service in the image recognition business service further includes a resource storage service, the resource storage service is used to provide an intermediate service for file storage, encapsulates a standard storage interface to other services, and can be connected to multiple services later.
- a file storage service is used to provide an intermediate service for file storage, encapsulates a standard storage interface to other services, and can be connected to multiple services later.
- the resource storage service is equivalent to an adapter, which is used to adapt to different file storage formats, such as different file storage services such as Qiniu Cloud, Huawei Cloud, and fastdfs.
- the indexing service providing the target index file to the file storage service in the basic service further includes that the indexing service first converts the target index file by using the resource storage service, and then converts the converted index file The file is sent to the file storage service for storage.
- the providing the target storage address to the target recognition service corresponding to the target atlas set corresponding to the target recognition map in the at least one recognition service through the publishing service includes: The publication service obtains the publication status indication information corresponding to the target atlas from the database service in the basic service corresponding to the image recognition service; if the publication status indication information indicates that the target atlas has been published, the publication The service obtains the target recognition service corresponding to the target atlas in the at least one recognition service from the database service, and provides the target storage address to the target atlas corresponding to the target atlas according to the service address of the target recognition service.
- the publication status indication information is used to indicate the publication status of the target atlas, including but not limited to published, unpublished, published, etc.
- the publication service obtains the corresponding target atlas by querying the database service. Publishing status, if the target atlas has been published, query the database service to obtain the target identification service corresponding to the target atlas (it can be the identification information of the target identification service, such as name, address, etc.), and provide the storage address of the target index file.
- the target identification service if the target atlas is not published, determine the target identification service from at least one identification service, and provide the storage address of the target index file to the determined target identification service.
- the identification service with a small number of loaded pictures/low load is given priority to publish, and for the published atlas, the information about the identification service is queried from the database service, and a notification is made.
- the corresponding recognition service loads the index file corresponding to the target recognition map.
- the determining, by the publishing service, the target recognition service from the deployed recognition services in the at least one recognition service comprises: obtaining the at least one recognition from the database service by the publishing service The currently loaded atlas information corresponding to the deployed identification services in the service; the target identification service is determined from the deployed identification services according to the currently loaded atlas information through the publishing service, wherein the target identification service The corresponding current loading information satisfies at least one of the following: the number of currently loaded atlases is the least; the number of recognition maps in the currently loaded atlas is the least.
- the publishing service obtains the currently loaded atlas information for each of the at least one identification service from the database service, and then, according to the currently loaded atlas information for each identification service, obtains information from the at least one identification service.
- a target recognition service is determined in the service, wherein the target recognition service may be the recognition service with the least number of currently loaded atlases, or may be the recognition service with the least number of recognition graphs in the currently loaded atlases.
- the currently loaded atlas information may be any information related to the atlas currently loaded by the target recognition service, such as whether the atlas is currently loaded, the number of currently loaded atlas, each currently loaded atlas , the identification information of each currently loaded atlas, and the number of identification images in each currently loaded atlas, the index file corresponding to the identification image in each currently loaded atlas, the address of the index file, and any other information.
- the recognition service includes M1, M2 and M3, the number of loaded atlases in M1 is 20, the number of loaded atlases in M2 is 32, and the number of loaded atlases in M3 is 25, then select the currently loaded atlas M1 with the smallest number is used as the target recognition service corresponding to the target atlas.
- the recognition service includes N1, N2 and N3, the number of recognition maps loaded in N1 is 450, the number of recognition maps loaded in N2 is 312, and the number of recognition maps loaded in N3 is 256, then select the currently loaded recognition map N3 with the least number of graphs is used as the target recognition service corresponding to the target atlas.
- the business service in the image recognition business service further includes an image recognition management service, the image recognition management service is used to manage the at least one recognition service; wherein the method further comprises: for the Each recognition service in the at least one recognition service, when the recognition service is started, sends registration information to the image recognition management service according to the domain name information and/or address information of the image recognition management service; The management service receives the registration information, generates relevant information of the recognition service according to the registration information, and stores the relevant information of the recognition service in the database service in the basic service corresponding to the image recognition service.
- the business service in the image recognition business service further includes an image recognition management service
- the image recognition management service is used to generate the relevant information of the recognition service in the database service (for example, the currently loaded recognition map ID, index file address, atlas, publishing time and other currently loaded atlas information) to record the relevant information of each currently activated identification service
- the publishing service can obtain at least one identification service from the database service.
- the atlas information currently loaded by each identification service is identified, and then the target identification service is determined from the at least one identification service according to the currently loaded atlas information of each identification service.
- the method further includes: for each activated recognition service in the at least one recognition service, periodically sending heartbeat information to the image recognition management service through the activated recognition service;
- the image recognition management service does not receive the heartbeat information sent by the seventh recognition service in the at least one recognition service within the predetermined time interval, then the eighth recognition service is determined in the at least one recognition service, and the database service is obtained from the database service.
- the method further includes: for the image publishing service request, if the target business service corresponding to the image publishing service request has been deployed on multiple container sets, using the container management platform according to the Load information of each container set in multiple container sets, determine a target container set from the multiple container sets, and process the image publishing service request through the target business service deployed on the target container set.
- FIG. 4 shows a flowchart of an image recognition method based on an image recognition service deployed on a container cloud according to an embodiment of the present application, wherein an image recognition service corresponding to the image recognition service is deployed on the container cloud, and the The container management platform manages the image recognition business service, and the business services in the image recognition business service include at least one of the following: at least one recognition service, feature extraction service, image recognition API service, for the image recognition business service
- the business services in the image recognition business service include at least one of the following: at least one recognition service, feature extraction service, image recognition API service, for the image recognition business service
- create a container set on the container cloud according to the deployment file and start the business service the container set loads the configuration file corresponding to the business service, and the configuration file contains other business services that the business service depends on.
- step S31 an image recognition service request for the picture to be recognized sent by the target application is received through the image recognition API service, and a user atlas corresponding to the to-be-recognized picture is obtained;
- step S32 the image recognition The API service obtains the target recognition service corresponding to the user atlas in the at least one recognition service from the database service in the basic service corresponding to the image recognition service, and extracts the target recognition service according to the service address of the feature extraction service
- the to-be-recognized picture and the target recognition service are provided to the feature extraction service; in step S33, the to-be-recognized picture and the target recognition service are obtained through the feature extraction service, and feature information of the to-be-recognized picture is extracted , and provide the feature information to the target
- the target application sends the to-be-recognized image, and after the recognition API service receives the to-be-recognized image, a user atlas corresponding to the to-be-recognized image is obtained.
- the atlas corresponding to the target application may be used as the to-be-recognized image
- the corresponding user atlas, or, the atlas corresponding to the user account can be used as the user atlas corresponding to the to-be-recognized picture, or the specified atlas information sent by the target application can also be used as the to-be-recognized The corresponding user atlas .
- a configuration file corresponding to the image recognition API service is loaded from the configuration service according to the configuration service address in the deployment file, and the configuration file includes the feature extraction service on which the image recognition API service depends. service address.
- the image recognition API service queries the database service for the target recognition service corresponding to the user atlas (eg, the address, name, etc. of the target recognition service).
- the business service in the image recognition business service also includes a publishing service, the image recognition API service calls the publishing service, and the publishing service queries the target recognition service (such as the target recognition service) corresponding to the user atlas from the database service. address, name, etc.), and returns the object recognition service to the image recognition API service.
- the business service in the image recognition business service further includes an image recognition management service
- the image recognition management service is used to generate the relevant information of the recognition service (for example, the currently loaded recognition map) in the database service ID, index file address, atlas, release time and other currently loaded atlas information) to record the relevant information of each currently activated recognition service, and the image recognition API service can obtain the corresponding atlas from the database service. object recognition service, and then returns the object recognition service to the image recognition API service.
- the image recognition API service sends the image to be recognized and the corresponding target recognition service (such as the address and name of the target recognition service) to the feature extraction service according to the service address of the feature extraction service in the configuration file, and the feature extraction service extracts the to-be-recognized image.
- target recognition service such as the address and name of the target recognition service
- the feature information is provided to the target recognition service, and the target recognition service matches the feature information with one or more index files currently loaded by the target recognition service, If the matching is successful, obtain the target identification map information (for example, identification map ID, identification map name, etc.) corresponding to the target index file matching the feature information, and return the target identification map information to the image recognition API service, image recognition
- the API service queries the basic service according to the returned target recognition map information to obtain the AR material bound to the target recognition map information, and the image recognition API service returns the AR material to the target application.
- the image recognition API service returns the AR material to the target application.
- the image recognition API service may obtain the AR material from the file storage service in the basic service and directly convert the AR material to the target application. Return to the target application, or, the image recognition API service can also obtain the storage address corresponding to the AR material from the database service and return the download address corresponding to the AR material to the target application, and the target application downloads the corresponding AR material, here Not limited; in some embodiments, if the matching fails, the target recognition service or the image recognition API service generates image recognition service response information for indicating that the image to be recognized fails to be recognized, and returns the image recognition service response information to the target application, to prompt the user that the identification failed.
- the business service in the image recognition business service further includes an account service, and the account service is used to provide services related to account management, such as managing users, enterprise-related information, and the like.
- the receiving, by using the image recognition API service, an image recognition service request for a picture to be recognized and sent by a target application, and obtaining a user atlas corresponding to the to-be-recognized picture includes: using the image recognition The API service receives the image recognition service request sent by the target application for the picture to be recognized, and performs access authority authentication on the target application; if the authentication is passed, the user atlas corresponding to the to-be-recognized picture is obtained.
- the target application sends the to-be-recognized picture to the recognition API service, and the image recognition API service will first perform access authorization authentication on the target application or user identity. The corresponding user atlas, and identify the image to be identified.
- the method further includes: for the image recognition service request, if the target business service corresponding to the image recognition service request has been deployed on multiple container sets, using the container management platform according to the Load information of each container set in multiple container sets, determine a target container set from the multiple container sets, and process the image recognition service request through the target business service deployed on the target container set.
- the business service in the image recognition business service further includes at least one of the following: a front-end resource service, an indexing service, a content management service, and a resource storage service, wherein the front-end resource service is used to receive user requests for Relevant operation information performed by the target recognition map; the content management service responds to the relevant operation information performed by the user on the target recognition map, and accordingly updates the relevant information of the target recognition map in the database service; the index service user generates the target Identify the index file of the graph; the resource storage service is used to provide an intermediate service for file storage, encapsulates a standard storage interface to other services, and can be connected to a variety of file storage services later.
- a front-end resource service is used to receive user requests for Relevant operation information performed by the target recognition map
- the content management service responds to the relevant operation information performed by the user on the target recognition map, and accordingly updates the relevant information of the target recognition map in the database service
- the index service user generates the target Identify the index file of the graph
- the resource storage service
- the business service in the image recognition business service further includes an image recognition management service, the image recognition management service is used to manage the at least one recognition service; wherein the method further comprises: for the Each recognition service in the at least one recognition service, when the recognition service is started, sends registration information to the image recognition management service according to the domain name information and/or address information of the image recognition management service; The management service receives the registration information, generates relevant information of the recognition service according to the registration information, and stores the relevant information of the recognition service in the database service in the basic service corresponding to the image recognition service.
- the relevant operations in this embodiment have been described in detail in the foregoing embodiments, and are not repeated here.
- the method further includes: for each activated recognition service in the at least one recognition service, periodically sending heartbeat information to the image recognition management service through the activated recognition service;
- the image recognition management service does not receive the heartbeat information sent by the ninth recognition service in the at least one recognition service within a predetermined time interval, then the tenth recognition service is determined in the at least one recognition service, and the database service is obtained from the database service.
- FIG. 5 shows a structural diagram of a network device for deploying an image recognition service on a container cloud according to an embodiment of the present application.
- the device includes a first module 11 and a second module 12 .
- a module 11 is configured to obtain a deployment file corresponding to the image recognition business service in the image recognition service after the basic service in the image recognition service is deployed, wherein the deployment file includes the image recognition business service in the The service name, image file address, number of container sets, and configuration service address corresponding to each business service.
- the business services in the image recognition business service include at least one of the following: image recognition management service, front-end resource service, indexing service, at least one A recognition service, feature extraction service, account service, content management service, publishing service, image recognition API service, and resource storage service; one or two modules 12 are used for each business service in the image recognition business service, according to the
- the deployment file creates a container set on the container cloud and starts the business service, loads the corresponding configuration file according to the configuration service address corresponding to the business service through the container set, and manages the business service through the container management platform.
- the configuration file contains the mapping relationship between the service names and service addresses of other business services that the business service depends on, so that the business service calls other business services that the business service depends on according to the mapping relationship; wherein, by The image recognition business service deployed by the container cloud performs at least any one of the following: receiving an image publishing service request for a first recognition map through the publishing service, obtaining the first recognition map, and publishing the first recognition map.
- the identification map is provided to the indexing service; the first identification map is obtained through the indexing service, a first index file corresponding to the first identification map is generated, and the first storage address corresponding to the first index file is stored Return to the publishing service; obtain the first storage address through the publishing service, and provide the first storage address to the first atlas corresponding to the first identification map in the at least one identification service obtain the first storage address through the first identification service, and load the first index file according to the first storage address; or, through the image recognition API service to receive the data sent by the target application , for the image recognition service request of the picture to be recognized, obtain the user atlas corresponding to the picture to be recognized; obtain the at least one recognition service from the database service in the basic service through the image recognition API service.
- the second identification service corresponding to the user atlas provides the picture to be identified and the second identification service to the feature extraction service; obtains the picture to be identified and the second identification service through the feature extraction service , extract the feature information of the picture to be recognized, and provide the feature information to the second recognition service; obtain the feature information through the second recognition service, and combine the feature information with the second recognition service
- the index file currently loaded by the service is matched; if the matching is successful, the second identification map information corresponding to the second index file matching the feature information is obtained through the second identification service, and the second identification map
- the information is returned to the image recognition API service, through the image recognition A
- the PI service obtains the second identification map information, obtains the second AR material corresponding to the second identification map information from the basic service, and returns the second AR material to the target application.
- containerization technology (docker) is used to support the creation and use of Linux containers. Docker utilizes resource separation mechanisms in the Linux kernel, such as cgroups, and Linux kernel namespaces (namespaces) to create independent containers (containers). ).
- Containerization is an approach to software development whereby an application or service, its dependencies, and its configuration (abstracted as a deployment manifest file) are packaged together as a container image, where a software container acts as the standard unit of software deployment.
- container management platforms including but not limited to Kubernetes (K8s), Swam, Meso, etc., where Kubernetes provides a framework for running distributed systems elastically, in the context of Kubernetes as an example for container management platforms described) for deploying, scaling, and managing containerized applications, so groups of hosts running Linux containers can be clustered together, efficiently managed by Kubernetes, and available across public clouds, Private or hybrid cloud deployment hosts.
- Kubernetes consists of a set of nodes, which can be physical hosts or virtual machines.
- the Kubernetes platform runs on these nodes to form a cluster.
- a Kubernetes cluster consists of a Master Node (host node) and a worker Node (node) for the actual deployed Pods.
- a cluster is often composed of multiple Master Nodes. These Master Nodes control all Nodes of the entire cluster, and all task assignments come from the Master Nodes.
- the Master Node controls the entire cluster, makes global decisions about the cluster (such as scheduling), and detects and responds to cluster events.
- Node is the real workload node in the K8s cluster.
- the K8s cluster shares the workload with multiple Nodes, and supports dynamic addition or deletion of Nodes in the cluster.
- Pod (container set) is assigned to a specific Node for execution, and contains a container group of one or more containers. All containers in the same container set share the same IP address, IPC, hostname, and other resources. Containers are subordinate to Pods. In running applications, libraries and their dependent microservices, containers are the lowest level. By binding an external IP, containers can be accessed by the external network.
- the Kubernetes master node accepts instructions from the outside, and then forwards the instructions to the affiliated Nodes (nodes), this switching work with a large number of services automatically determines the most suitable node for the task, and then The node allocates resources and assigns Pods (container sets) to complete task requests.
- each business service in the image recognition service is packaged in a docker image and runs in each Pod in Kubernetes.
- the container cloud platform combines container technology and container management platform in the cloud to provide a platform for building, publishing and running distributed applications, hereinafter referred to as container cloud.
- the container cloud runs on multiple sets of servers (for example, x64 servers, x86 servers), deploys multiple business services in the image recognition service on the container cloud, and uses Kubernetes to perform operations on the services deployed on the container cloud.
- the management of these business services in the image recognition service can solve the technical problem of rapid expansion of large-scale image recognition services, realize the load balancing and dynamic expansion of image recognition services, solve the problem of differences in the deployment of different systems and different hardware environments, and improve the service quality. Portability and security, reduce deployment difficulty, increase deployment flexibility, and accelerate the launch of related products.
- the basic services in the image recognition service include at least one of the following: database, cache database, file storage, configuration, image repository, configuration editor and other related basic services
- the basic services can be deployed On the container cloud, it can also be deployed on the periphery of the container cloud (eg, on an external entity cloud server).
- the basic service is deployed on the periphery of the container cloud.
- k8s obtains a deployment file corresponding to the image recognition business service in the image recognition service.
- the deployment file is the basic file for starting the image recognition service, and k8s is specified in it.
- the required basic content such as specifying the service name of each business service in the image recognition business service, the image file address, the number of container sets, and the environment variables when the container set is running (such as the address of the configuration service, etc.) in the deployment file,
- the configuration item key can also be specified in the environment variable, and further, the content of the service (SVC) of each business service (including the exposed port and other content) can also be specified in the deployment file, and k8s is created according to the deployment file.
- SVC content of the service
- the image recognition business service includes at least one of the following: image recognition management service, front-end resource service, indexing service, recognition service, feature extraction service, account service , content management service, publishing service, image recognition API service, resource storage service, wherein, there may be one or more deployment files, which are not limited here.
- each business service corresponds to the same configuration service address, and in other embodiments, each business service corresponds to a different configuration service address, which is not limited herein. There is no restriction on the deployment sequence of different business services here.
- the image recognition management service is used to perform service control, such as controlling the allocation of recognition servers, and the like.
- the front-end resource service is used to manage the back-end or the front-end of the web page, and is also an entry service included in the corresponding client.
- the image recognition business service includes a second layer service that depends on the basic service and a first layer service that depends on the second layer service, wherein the second layer service
- the service is used to provide services that are biased towards the underlying algorithm function type (such as at least one service such as indexing service, identification service, feature extraction service, etc.), and has little relevance to specific business logic.
- the first layer service is used to provide Services that are biased towards upper-level business logic types (such as account services, content management services, publishing services, image recognition API services, etc.) are closely related to specific business logic.
- first First-tier services and second-tier services are divided according to business logic, which does not mean that there is hierarchical division in deployment, but is only used to facilitate understanding of business logic.
- Dependency means that the relying party directly or indirectly uses or invokes or updates the data, functions, interfaces, etc. of the relying party.
- the publishing service in the first-tier service needs to call the indexing service in the second-tier service; for example, the first-tier service
- the content management service in the service updates the database content in the base service, etc.
- Figure 2 is a service architecture diagram of an example of the application, in which all business services and configuration editors are stored in the mirror warehouse, the mirror address is configured after the service is created in the container cloud, and the corresponding configuration is obtained from the configuration service (etcd) after the service is started.
- the cluster service entrance is the front-end resource service (webhiar)
- the service request is forwarded to the account service (accountsrv), content management service (contentsrv), publishing service (publishsrv)
- the first layer of services such as image recognition API service (recognizesrv), the first layer relies on indexing services (including cloud indexing service (cloudkey), local indexing service (localkey)), recognition service (searchsrv), feature extraction service (featuresrv) and other third-level services.
- the second-tier service relies on basic services such as the database service mysql, the file storage service fastdfs, and the resource storage service (storagesrv).
- webhiar is used as the access entry, which is used to deploy the entry service of the API of the management background or the front end of the web page.
- the access of the application and the API request of the application end are all entrances from this node.
- the server can be deployed on the server. After building load balancing before, different services in the architecture can expand nodes according to the pressure of different requests. It should be noted that, the various services involved in the above will be described in detail in subsequent embodiments.
- the portability and security of the image recognition service can be improved.
- a container is created on the container cloud according to deployment information such as the service name, image file address, number of container sets, etc. corresponding to each business service in the deployment file set and start the business service, the container set loads the configuration file corresponding to the business service from the configuration service according to the configuration service address in the deployment file (for example, the configuration service includes a plurality of configuration files corresponding to different business services respectively , the configuration file corresponding to the business service can be found in the configuration service through the service name of the business service and loaded) to complete the startup of the business service, and the container management platform (for example, k8s) has been deployed on the container cloud. At least one of the image recognition business services is managed.
- a configuration file needs to be loaded when the business service is started, and the configuration file contains the content required by the business service when it runs, usually including the port number occupied by the business service, the database address of the connection, the address of the cache server, dependencies (need to call ) service address of other business services.
- K8S creates a container set corresponding to the business service and the number of container sets on the container cloud according to the number of container sets corresponding to the business service in the deployment file, and according to the image file corresponding to the business service in the deployment file address, download the image file corresponding to the business service, start the business service on the container set according to the image file, and then set the environment variable according to the deployment file, and the container set reads the configuration service set in the environment variable. address, load the configuration file corresponding to the business service from the configuration service, and complete the startup of the business service according to the content of the configuration file, and then the business service can process the business request.
- the k8s master node (Master Node) accepts instructions from the outside, and then forwards the instructions to the attached Node (node), and then allocates resources on the node and assigns Pod (container set) to complete the task request.
- Each service is encapsulated in a docker image and runs in each Pod in k8s.
- using k8s to manage the image recognition service deployed on the container cloud can solve the technical problem of rapid expansion of large-scale image recognition services, realize load balancing and dynamic expansion of image recognition services, reduce deployment difficulty, and increase Deployment flexibility to accelerate the launch of related products.
- the configuration file includes a mapping relationship between service names and service addresses of other business services that the business service depends on, so that the business service can call other services that the business service depends on according to the mapping relationship.
- the configuration file corresponding to the publishing service contains the mapping relationship between the service name of the indexing service and the indexing service address and other services.
- the second layer service includes at least one of the following:
- the related layer 2 services are the same as or similar to the embodiment shown in FIG. 1 , so they are not described again, and are incorporated herein by reference.
- the first-tier service includes at least one of the following:
- the related first-layer services are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, and are incorporated herein by reference.
- the basic service includes at least one of the following:
- the device is further configured to: deploy a resource storage service (storagesrv) on the container cloud.
- a resource storage service (storagesrv)
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- creating a container set on the container cloud according to the deployment file and starting the business service includes: for each business service in the image recognition business service a business service, according to the number of container sets corresponding to the business service in the deployment file, create a container set corresponding to the business service and the number of container sets on the container cloud, and according to the number of container sets corresponding to the business service in the deployment file Image file address, download the image file corresponding to the business service, and start the business service on the container set according to the image file.
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- the image recognition management service is used to manage the at least one recognition service; wherein the device is further configured to: for each recognition service of the at least one recognition service, start the recognition service at the When the image recognition management service is used, send registration information to the image recognition management service according to the domain name information and/or address information of the image recognition management service; receive the registration information through the image recognition management service, and generate the identification according to the registration information
- the relevant information of the service is stored, and the relevant information of the identification service is stored in the database service in the basic service.
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- the device is further configured to: for each activated recognition service in the at least one recognition service, periodically send heartbeat information to the image recognition management service through the activated recognition service; if The image recognition management service does not receive the heartbeat information sent by the third recognition service in the at least one recognition service within the predetermined time interval, then determines the fourth recognition service in the at least one recognition service, The database service in the service obtains the currently loaded atlas information corresponding to the third identification service, so as to load the atlas corresponding to the currently loaded atlas information in the fourth identification service.
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- the determining a fourth identification service in the at least one identification service includes: if the image identification management service receives a message sent by a newly started fifth identification service in the at least one identification service registration information, and the fifth recognition service is determined as the fourth recognition service through the image recognition management service.
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- the determining of a fourth recognition service among the at least one recognition service includes: obtaining, through the image recognition management service, each activated one of the at least one recognition service from the database service The currently loaded atlas information of the recognition service; the image recognition management service determines a fourth recognition service according to the currently loaded atlas information of each activated recognition service, wherein the fourth recognition service satisfies at least the following One item: currently no atlases are loaded; the least number of currently loaded atlases; the least number of recognized images in the currently loaded atlases.
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- the device is further configured to: for the image service request to be processed, if the target business service corresponding to the image service request to be processed has been deployed on multiple container sets, use the container management platform according to the Load information of each container set in multiple container sets, determine a target container set from the multiple container sets, and process the to-be-processed image service request through the target business service deployed on the target container set.
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- the device is further configured to: monitor the running status information of the created one or more container sets through the container management platform, and if the monitored load information of the target container set meets the predetermined capacity expansion condition, create a or multiple second target container sets, and deploy business services corresponding to the target container sets on the one or more second target container sets.
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- the device is further configured to: in response to the expansion instruction for the target container set, create one or more second target container sets through the container management platform, and create one or more second target container sets in the one or more second container sets A business service corresponding to the target container set is deployed on the target container set.
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- the device is further configured to: if the container management platform determines that the target user atlas satisfies a predetermined concurrent loading condition, determine one or more concurrent identification services corresponding to the target user atlas; Each of the one or more concurrent identification services separately loads the target user graph.
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- the determining one or more concurrent identification services corresponding to the target user atlas includes: determining one corresponding to the target user atlas from identification services deployed in the at least one identification service or multiple concurrent recognition services.
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- the determining one or more concurrent identification services corresponding to the target user atlas includes: creating one or more second target container sets, in the one or more second target container sets One or more sixth identification services are respectively deployed on each second target container set, and the one or more sixth identification services are used as one or more concurrent identification services corresponding to the target user atlas.
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- the device is further configured to: if the container management platform determines that the target user atlas satisfies a predetermined division condition, divide the target user atlas into a plurality of mutually disjoint subsets, wherein the Each subset in the plurality of subsets includes at least one identification map; one or more identification services corresponding to the target user atlas are determined; the multiple identification services are respectively loaded through each of the one or more identification services A subset of the subsets, wherein different identification services correspond to different subsets.
- the related operations are the same as or similar to the embodiment shown in FIG. 1 , so they are not repeated here, but are incorporated herein by reference.
- FIG. 6 shows a network device structure diagram for image publishing based on an image recognition service deployed on a container cloud according to an embodiment of the present application, wherein an image recognition service corresponding to the image recognition service is deployed on the container cloud, and
- the image recognition business service is managed through the container management platform, and the business services in the image recognition business service include at least one of the following: front-end resource service, indexing service, at least one identification service, content management service, and publishing service.
- the container set For each business service in the image recognition business service, create a container set on the container cloud according to the deployment file and start the business service, the container set loads the configuration file corresponding to the business service, and the configuration file contains the business service.
- the second module 21 is configured to receive an image publishing service request for a target recognition map through the publishing service, obtain the target recognition map, and provide the target recognition map to the index according to the service address of the index service
- the second module 22 is configured to obtain the target identification map through the indexing service, generate a target index file corresponding to the target identification map, and return the target storage address corresponding to the target index file to the publishing service
- the second and third modules 23 are used to obtain the target storage address through the publishing service, and provide the target storage address to the target corresponding to the target atlas corresponding to the target identification map in the at least one identification service.
- identification service; the second and fourth module 24 is configured to obtain the target storage address through the target identification service, and load the target index file according to the target storage address.
- "publishing" in the context refers to adding an object recognition map to a recognition server or loading an index file corresponding to the object recognition map to the recognition server to provide retrieval.
- the user uploads the target recognition map in the front-end resource service interface, and performs a series of operations on the target recognition map, such as adding the target recognition map to an existing atlas or creating a new atlas and placing the target recognition map in the new map
- Another example is to bind the target recognition map to an AR material, and the content management service obtains the target recognition map and the atlas information corresponding to the target recognition map in response to the relevant operation information performed by the user on the target recognition map.
- the AR material bound to the target recognition map can also be obtained, and the related information of the target recognition map can be updated in the database service based on this, wherein the related information includes any one of the following: identification information of the target recognition map , the storage address of the target recognition map, the identification information of the atlas corresponding to the target recognition map, the identification information of the AR material bound to the target recognition map, the storage address of the AR material bound to the target recognition map, etc.
- the image publishing service request for the image is sent to the publishing service.
- the image publishing service request includes a target recognition map, where the target recognition map can be the target recognition map itself or the identification of the target recognition map.
- Information such as name, ID, etc.
- the image publishing service request may include, in addition to the target identification map, information of the atlas corresponding to the target identification map (for example, the identification of the atlas, etc.).
- a configuration file corresponding to the publishing service is loaded from the configuration service according to the configuration service address in the configuration file.
- the configuration file includes the service address of the indexing service on which the publishing service depends, and the publishing service receives After receiving the image publishing service request for the target recognition map, obtain the target recognition map corresponding to the image publishing service request (it can be the target recognition map itself, or the identification information of the target recognition map, such as name, ID, etc.), and according to the configuration file
- the service address of the indexing service in provides the identification information of the target identification map or material image to the indexing service, and the local indexing service or cloud indexing service generates the index file corresponding to the target identification map (the local indexing service is used to generate the locally identified index file.
- the cloud index service is used to generate the index file identified by the cloud, and the feature extraction algorithms corresponding to the two index services can be the same or different), the generated index file will be stored in the file storage service, and the index file corresponding to the index file will be stored at the address.
- the publishing service provides the storage address to the identification service corresponding to the atlas corresponding to the target identification map, and the identification service loads the corresponding index file from the file storage service to the memory according to the storage address of the index file to provide target identification.
- Graph recognition service is used to generate the index file identified by the cloud, and the feature extraction algorithms corresponding to the two index services can be the same or different
- the relevant information corresponding to the target recognition map in the database service is updated, such as updating the publication status of the target recognition map, updating the recognition server information corresponding to the atlas corresponding to the target recognition map, etc. .
- the publishing service can obtain the atlas information corresponding to the target recognition map through the information contained in the image publishing service request, and can also obtain the map corresponding to the target recognition map through the publishing service to the database service.
- the information of the set is not limited here.
- the business service in the image recognition business service further includes an account service, and the account service is used to provide services related to account management, such as managing users, enterprise-related information, and the like.
- the device is further configured to: receive, through the front-end resource service, user operation information on the target identification map, and forward the operation information to a content management service; and through the content management service according to the operation information, obtain the target recognition map and the target atlas corresponding to the target recognition map, update the relevant information of the target recognition map in the database service in the basic service corresponding to the image recognition service, and generate the target recognition map for the target
- An image publishing service request for a graph is identified and sent to the publishing service.
- the indexing service obtains the target identification map, generates a target index file corresponding to the target identification map, and returns the target storage address corresponding to the target index file to the publishing service, including: The indexing service obtains the target identification map, generates a target index file corresponding to the target identification map, and provides the target index file to the file storage service in the basic service; obtains the target index file through the file storage service. the target index file, store and obtain the target storage address corresponding to the target index file, and return the target storage address to the indexing service; obtain the target storage address through the indexing service, and store the target The address returned to the publishing service.
- the related operations are the same as or similar to the embodiment shown in FIG. 3 , so they are not described again, but are incorporated herein by reference.
- providing the target storage address to a target recognition service corresponding to the target atlas set corresponding to the target recognition map in the at least one recognition service by the publishing service includes: by the publishing The service obtains the publication status indication information corresponding to the target atlas from the database service in the basic service corresponding to the image recognition service; if the publication status indication information indicates that the target atlas has been published, the target atlas is published through the publication service.
- the database service obtains the target recognition service corresponding to the target atlas in the at least one recognition service, and provides the target storage address to the target recognition corresponding to the target atlas according to the service address of the target recognition service service; if the publication status information indicates that the target atlas has not been published, determine the target recognition service from the deployed recognition services in the at least one recognition service through the publication service, and identify the service of the service according to the target The address provides the target storage address to the target identification service.
- the related operations are the same as or similar to the embodiment shown in FIG. 3 , so they are not described again, but are incorporated herein by reference.
- the determining, by the publishing service, the target recognition service from the deployed recognition services in the at least one recognition service comprises: obtaining the at least one recognition from the database service by the publishing service The currently loaded atlas information corresponding to the deployed identification services in the service; the target identification service is determined from the deployed identification services according to the currently loaded atlas information through the publishing service, wherein the target identification service The corresponding current loading information satisfies at least one of the following: the number of currently loaded atlases is the least; the number of recognition maps in the currently loaded atlas is the least.
- the related operations are the same as or similar to the embodiment shown in FIG. 3 , so they are not described again, but are incorporated herein by reference.
- the business service in the image recognition business service further includes an image recognition management service, and the image recognition management service is used to manage the at least one recognition service; wherein, the device is further configured to: for all Each recognition service in the at least one recognition service, when the recognition service is started, according to the domain name information and/or address information of the image recognition management service, send registration information to the image recognition management service;
- the recognition management service receives the registration information, generates relevant information of the recognition service according to the registration information, and stores the relevant information of the recognition service in the database service in the basic service corresponding to the image recognition service.
- the related operations are the same as or similar to the embodiment shown in FIG. 3 , so they are not described again, but are incorporated herein by reference.
- the device is further configured to: for each activated recognition service in the at least one recognition service, periodically send heartbeat information to the image recognition management service through the activated recognition service; if The image recognition management service does not receive the heartbeat information sent by the seventh recognition service in the at least one recognition service within a predetermined time interval, then determines the eighth recognition service in the at least one recognition service, and obtains the information from the database.
- the service obtains the currently loaded atlas information corresponding to the seventh identification service, so as to load the atlas corresponding to the currently loaded atlas information in the eighth identification service.
- the related operations are the same as or similar to the embodiment shown in FIG. 3 , so they are not described again, but are incorporated herein by reference.
- the device is further configured to: for the image publishing service request, if the target business service corresponding to the image publishing service request has been deployed on multiple container sets, use the container management platform to load information of each container set in the multiple container sets, determine a target container set from the multiple container sets, and process the image publishing service request through the target business service deployed on the target container set.
- the related operations are the same as or similar to the embodiment shown in FIG. 3 , so they are not described again, but are incorporated herein by reference.
- FIG. 7 shows a network device structure diagram of image recognition based on an image recognition service deployed on a container cloud according to an embodiment of the present application, wherein an image recognition service corresponding to the image recognition service is deployed on the container cloud, and
- the image recognition business service is managed through the container management platform, and the business services in the image recognition business service include at least one of the following: at least one recognition service, feature extraction service, and image recognition API service, for the image recognition service
- the business services in the image recognition business service include at least one of the following: at least one recognition service, feature extraction service, and image recognition API service, for the image recognition service
- the container set loads the configuration file corresponding to the business service, and the configuration file contains other services that the business service depends on.
- the 31 module 31 is used to receive, through the image recognition API service, the image recognition service request for the picture to be recognized sent by the target application, and obtain the user atlas corresponding to the picture to be recognized;
- the 32 module 32 is used to pass The image recognition API service obtains the target recognition service corresponding to the user atlas in the at least one recognition service from the database service in the basic service corresponding to the image recognition service, and extracts the service of the service according to the feature address to provide the to-be-recognized picture and the target recognition service to the feature extraction service;
- the third module 33 is configured to obtain the to-be-recognized picture and the target recognition service through the feature extraction service, and extract the The feature information of the picture to be recognized, and the feature information is provided to the target recognition service according to the service address of the target recognition service;
- the third and fourth modules 34 are used to obtain the feature information through the target recognition service, and The feature information is matched with the index file currently loaded by the target recognition service;
- the three-five module 35 is
- the target application sends the to-be-recognized image, and after the recognition API service receives the to-be-recognized image, a user atlas corresponding to the to-be-recognized image is obtained.
- the atlas corresponding to the target application may be used as the to-be-recognized image
- the corresponding user atlas, or, the atlas corresponding to the user account can be used as the user atlas corresponding to the to-be-recognized picture, or the specified atlas information sent by the target application can also be used as the to-be-recognized The corresponding user atlas .
- a configuration file corresponding to the image recognition API service is loaded from the configuration service according to the configuration service address in the configuration file, and the configuration file includes the feature extraction service on which the image recognition API service depends. service address.
- the image recognition API service queries the database service for the target recognition service corresponding to the user atlas (eg, the address, name, etc. of the target recognition service).
- the business service in the image recognition business service also includes a publishing service, the image recognition API service calls the publishing service, and the publishing service queries the target recognition service (such as the target recognition service) corresponding to the user atlas from the database service. address, name, etc.), and returns the object recognition service to the image recognition API service.
- the business service in the image recognition business service further includes an image recognition management service
- the image recognition management service is used to generate the relevant information of the recognition service (for example, the currently loaded recognition map) in the database service ID, index file address, atlas, release time and other currently loaded atlas information) to record the relevant information of each currently activated recognition service, and the image recognition API service can obtain the corresponding atlas from the database service. object recognition service, and then returns the object recognition service to the image recognition API service.
- the image recognition API service sends the image to be recognized and the corresponding target recognition service (such as the address and name of the target recognition service) to the feature extraction service according to the service address of the feature extraction service in the configuration file, and the feature extraction service extracts the to-be-recognized image.
- target recognition service such as the address and name of the target recognition service
- the feature information is provided to the target recognition service, and the target recognition service matches the feature information with one or more index files currently loaded by the target recognition service, If the matching is successful, obtain the target identification map information (for example, identification map ID, identification map name, etc.) corresponding to the target index file matching the feature information, and return the target identification map information to the image recognition API service, image recognition
- the API service queries the basic service according to the returned target recognition map information to obtain the AR material bound to the target recognition map information, and the image recognition API service returns the AR material to the target application.
- the image recognition API service returns the AR material to the target application.
- the image recognition API service can obtain the AR material from the file storage service in the basic service and directly convert the AR material to the target application. Return to the target application, or, the image recognition API service can also obtain the storage address corresponding to the AR material from the database service and return the download address corresponding to the AR material to the target application, and the target application downloads the corresponding AR material, here Not limited; in some embodiments, if the matching fails, the target recognition service or the image recognition API service generates image recognition service response information for indicating that the image to be recognized fails to be recognized, and returns the image recognition service response information to the target application, to prompt the user that the identification failed.
- the business service in the image recognition business service further includes an account service, and the account service is used to provide services related to account management, such as managing users, enterprise-related information, and the like.
- the receiving, by using the image recognition API service, an image recognition service request for a picture to be recognized and sent by a target application, and obtaining a user atlas corresponding to the to-be-recognized picture includes: using the image recognition The API service receives the image recognition service request sent by the target application for the picture to be recognized, and performs access authority authentication on the target application; if the authentication is passed, the user atlas corresponding to the to-be-recognized picture is obtained.
- the related operations are the same as or similar to the embodiment shown in FIG. 4 , so they are not repeated here, and are incorporated herein by reference.
- the device is further configured to: for the image recognition service request, if the target business service corresponding to the image recognition service request has been deployed on multiple container sets, use the container management platform according to the requirements. load information of each container set in the multiple container sets, determine a target container set from the multiple container sets, and process the image recognition service request through the target business service deployed on the target container set.
- the related operations are the same as or similar to the embodiment shown in FIG. 4 , so they are not repeated here, and are incorporated herein by reference.
- the business service in the image recognition business service further includes at least one of the following: a front-end resource service, an indexing service, a content management service, and a resource storage service, wherein the front-end resource service is used to receive user requests for Relevant operation information performed by the target recognition map; the content management service responds to the relevant operation information performed by the user on the target recognition map, and accordingly updates the relevant information of the target recognition map in the database service; the index service user generates the target Identify the index file of the graph; the resource storage service is used to provide an intermediate service for file storage, encapsulates a standard storage interface to other services, and can be connected to a variety of file storage services later.
- a front-end resource service is used to receive user requests for Relevant operation information performed by the target recognition map
- the content management service responds to the relevant operation information performed by the user on the target recognition map, and accordingly updates the relevant information of the target recognition map in the database service
- the index service user generates the target Identify the index file of the graph
- the resource storage service
- the business service in the image recognition business service further includes an image recognition management service, and the image recognition management service is used to manage the at least one recognition service; wherein, the device is further configured to: for all Each recognition service in the at least one recognition service, when the recognition service is started, according to the domain name information and/or address information of the image recognition management service, send registration information to the image recognition management service;
- the recognition management service receives the registration information, generates relevant information of the recognition service according to the registration information, and stores the relevant information of the recognition service in the database service in the basic service corresponding to the image recognition service.
- the related operations are the same as or similar to the embodiment shown in FIG. 4 , so they are not repeated here, and are incorporated herein by reference.
- the device is further configured to: for each activated recognition service in the at least one recognition service, periodically send heartbeat information to the image recognition management service through the activated recognition service; if The image recognition management service does not receive the heartbeat information sent by the ninth recognition service in the at least one recognition service within a predetermined time interval, then determines the tenth recognition service in the at least one recognition service, and obtains the information from the database.
- the service obtains currently loaded atlas information corresponding to the ninth identification service, so as to load the atlas corresponding to the currently loaded atlas information in the tenth identification service.
- the related operations are the same as or similar to the embodiment shown in FIG. 4 , so they are not repeated here, and are incorporated herein by reference.
- FIG. 8 illustrates an exemplary system that may be used to implement various embodiments described in this application.
- system 300 can function as any of the devices in each of the described embodiments.
- system 300 may include one or more computer-readable media (eg, system memory or NVM/storage device 320 ) having instructions and be coupled to the one or more computer-readable media and configured to execute Instructions to implement a module to perform one or more processors (eg, processor(s) 305 ) to perform the actions described herein.
- processors eg, processor(s) 305
- system control module 310 may include any suitable interface controller to provide at least one of the processor(s) 305 and/or any suitable device or component in communication with the system control module 310 any appropriate interface.
- the system control module 310 may include a memory controller module 330 to provide an interface to the system memory 315 .
- the memory controller module 330 may be a hardware module, a software module, and/or a firmware module.
- System memory 315 may be used, for example, to load and store data and/or instructions for system 300 .
- system memory 315 may include any suitable volatile memory, eg, suitable DRAM.
- system memory 315 may include double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).
- system control module 310 may include one or more input/output (I/O) controllers to provide interfaces to NVM/storage device 320 and communication interface(s) 325 .
- I/O input/output
- NVM/storage device 320 may be used to store data and/or instructions.
- NVM/storage device 320 may include any suitable non-volatile memory (eg, flash memory) and/or may include any suitable non-volatile storage device(s) (eg, one or more hard drives ( HDD), one or more compact disc (CD) drives and/or one or more digital versatile disc (DVD) drives).
- HDD hard drives
- CD compact disc
- DVD digital versatile disc
- NVM/storage device 320 may include storage resources that are physically part of the device on which system 300 is installed, or it may be accessed by the device without necessarily being part of the device.
- the NVM/storage device 320 is accessible via the communication interface(s) 325 over a network.
- Communication interface(s) 325 may provide an interface for system 300 to communicate over one or more networks and/or with any other suitable device.
- System 300 may wirelessly communicate with one or more components of a wireless network in accordance with any of one or more wireless network standards and/or protocols.
- At least one of the processor(s) 305 may be packaged with the logic of one or more controllers of the system control module 310 (eg, the memory controller module 330 ). For one embodiment, at least one of the processor(s) 305 may be packaged with logic of one or more controllers of the system control module 310 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 305 may be integrated on the same die with the logic of one or more controllers of the system control module 310 . For one embodiment, at least one of the processor(s) 305 may be integrated on the same die with logic of one or more controllers of the system control module 310 to form a system on a chip (SoC).
- SoC system on a chip
- system 300 may be, but is not limited to, a server, workstation, desktop computing device, or mobile computing device (eg, laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, system 300 may have more or fewer components and/or different architectures. For example, in some embodiments, system 300 includes one or more cameras, keyboards, liquid crystal display (LCD) screens (including touchscreen displays), non-volatile memory ports, multiple antennas, graphics chips, application specific integrated circuits ( ASIC) and speakers.
- LCD liquid crystal display
- ASIC application specific integrated circuits
- the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores computer code, and when the computer code is executed, the method described in any preceding item is executed.
- the present application also provides a computer program product, when the computer program product is executed by a computer device, the method according to any one of the preceding items is executed.
- the present application also provides a computer device, the computer device comprising:
- processors one or more processors
- memory for storing one or more computer programs
- the one or more computer programs when executed by the one or more processors, cause the one or more processors to implement the method of any preceding item.
- the present application may be implemented in software and/or a combination of software and hardware, eg, an application specific integrated circuit (ASIC), a general purpose computer, or any other similar hardware device.
- the software program of the present application may be executed by a processor to implement the steps or functions described above.
- the software programs of the present application (including associated data structures) may be stored on a computer-readable recording medium, such as RAM memory, magnetic or optical drives or floppy disks, and the like.
- some steps or functions of the present application may be implemented in hardware, for example, as a circuit that cooperates with a processor to perform various steps or functions.
- a part of the present application can be applied as a computer program product, such as computer program instructions, which when executed by a computer, through the operation of the computer, can invoke or provide methods and/or technical solutions according to the present application.
- Those skilled in the art should understand that the existing forms of computer program instructions in computer-readable media include but are not limited to source files, executable files, installation package files, etc.
- the ways in which computer program instructions are executed by a computer include but are not limited to Limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding post-installation program. program.
- the computer-readable medium can be any available computer-readable storage medium or communication medium that can be accessed by a computer.
- Communication media includes media by which communication signals containing, for example, computer readable instructions, data structures, program modules or other data are transmitted from one system to another.
- Communication media may include conducted transmission media such as cables and wires (eg, fiber optic, coaxial, etc.) and wireless (unconducted transmission) media capable of propagating energy waves, such as acoustic, electromagnetic, RF, microwave, and infrared .
- Computer readable instructions, data structures, program modules or other data may be embodied, for example, as a modulated data signal in a wireless medium such as a carrier wave or similar mechanism such as embodied as part of spread spectrum technology.
- modulated data signal refers to a signal whose one or more characteristics are altered or set in a manner that encodes information in the signal. Modulation can be analog, digital or hybrid modulation techniques.
- computer-readable storage media may include volatile and non-volatile, readable storage media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Removable and non-removable media.
- computer-readable storage media include, but are not limited to, volatile memory, such as random access memory (RAM, DRAM, SRAM); and non-volatile memory, such as flash memory, various read-only memories (ROM, PROM, EPROM) , EEPROM), magnetic and ferromagnetic/ferroelectric memory (MRAM, FeRAM); and magnetic and optical storage devices (hard disks, tapes, CDs, DVDs); or other media now known or later developed capable of storing data for computer systems Computer readable information/data used.
- volatile memory such as random access memory (RAM, DRAM, SRAM
- non-volatile memory such as flash memory, various read-only memories (ROM, PROM, EPROM) , EEPROM), magnetic and ferromagnetic/ferroelectric memory (MRAM, FeRAM); and magnetic and optical storage devices (hard disks, tapes, CDs, DVDs); or other media now known or later developed capable of storing data for computer systems Computer readable information/data used.
- an embodiment according to the present application includes an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, a trigger is
- the apparatus operates based on the aforementioned methods and/or technical solutions according to various embodiments of the present application.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本申请的目的是提供一种在容器云上部署图像识别服务的方法,该方法包括:在部署完成图像识别服务中的基础服务后,获取所述图像识别服务中图像识别业务服务对应的部署文件,其中,所述图像识别业务服务中的业务服务包括以下至少一项:图像识别管理服务、前端资源服务、索引服务、至少一个识别服务、特征提取服务、账号服务、内容管理服务、发布服务、图像识别API服务、资源存储服务;对于所述图像识别业务服务中每个业务服务,根据所述部署文件在容器云上创建容器集并启动该业务服务,通过所述容器集根据该业务服务对应的配置服务地址加载对应的配置文件,并通过容器管理平台对该业务服务进行管理。
Description
本申请是以CN申请号为202011021515.1,申请日为2020.09.25的申请为基础,并主张其优先权,该CN申请的公开内容在此作为整体引入本申请中
本申请涉及通信领域,尤其涉及一种用于在容器云上部署图像识别服务的技术。
在现有技术中,图像识别服务通常部署在物理服务器或虚拟机(VM)上,需要人工操作增加硬件服务器资源,安装操作系统,并且修改配置启动服务,调整集群的容量和负载,有时候甚至需要重启服务集群,还需要搭建额外的日志和错误收集方式来处理服务重启和错误记录,面对大容量的图片加载的并发处理时,处理能力不易扩充。
发明内容
本申请的一个目的是提供一种在容器云上部署图像识别服务的方法与设备。
根据本申请的一个方面,提供了一种在容器云上部署图像识别服务的方法,该方法包括:
在部署完成图像识别服务中的基础服务后,获取所述图像识别服务中图像识别业务服务对应的部署文件,其中,所述部署文件中包含所述图像识别业务服务中每个业务服务对应的服务名称、镜像文件地址、容器集数量、配置服务地址,所述图像识别业务服务中的业务服务包括以下至少一项:图像识别管理服务、前端资源服务、索引服务、至少一个识别服务、特征提取服务、账号服务、内容管理服务、发布服务、图像识别API服务、资源存储服务;
对于所述图像识别业务服务中每个业务服务,根据所述部署文件在容器云上创建容器集并启动该业务服务,通过所述容器集根据该业务服务对应的配置服务地址加载对应 的配置文件,并通过容器管理平台对该业务服务进行管理,其中,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;
其中,通过所述容器云部署的所述图像识别业务服务执行以下至少任一项:
通过所述发布服务接收针对第一识别图的图像发布服务请求,获得所述第一识别图,并将所述第一识别图提供给所述索引服务;通过所述索引服务获得所述第一识别图,生成所述第一识别图对应的第一索引文件,并将所述第一索引文件对应的第一存储地址返回所述发布服务;通过所述发布服务获得所述第一存储地址,将所述第一存储地址提供给所述至少一个识别服务中与所述第一识别图对应的第一图集相对应的第一识别服务;通过所述第一识别服务获得所述第一存储地址,根据所述第一存储地址,加载所述第一索引文件;或者,
通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;通过所述图像识别API服务从所述基础服务中的数据库服务获得所述至少一个识别服务中所述用户图集对应的第二识别服务,将所述待识别图片及所述第二识别服务提供给所述特征提取服务;通过所述特征提取服务获得所述待识别图片及所述第二识别服务,提取所述待识别图片的特征信息,并将所述特征信息提供给所述第二识别服务;通过所述第二识别服务获得所述特征信息,将所述特征信息与所述第二识别服务当前已加载的索引文件进行匹配;若匹配成功,通过所述第二识别服务获得与所述特征信息相匹配的第二索引文件对应的第二识别图信息,并将所述第二识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述第二识别图信息,从所述基础服务获得所述第二识别图信息对应的第二AR素材,并将所述第二AR素材返回至所述目标应用。
根据本申请的另一个方面,提供了一种基于容器云上部署的图像识别服务的图像发布的方法,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务服务中的业务服务包括以下至少一项:前端资源服务、索引服务、至少一个识别服务、内容管理服务、发布服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该 业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;
其中,该方法包括:
通过所述发布服务接收针对目标识别图的图像发布服务请求,获得所述目标识别图,并根据所述索引服务的服务地址将所述目标识别图提供给所述索引服务;
通过所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件对应的目标存储地址返回所述发布服务;
通过所述发布服务获得所述目标存储地址,将所述目标存储地址提供给所述至少一个识别服务中与所述目标识别图对应的目标图集相对应的目标识别服务;
通过所述目标识别服务获得所述目标存储地址,根据所述目标存储地址,加载所述目标索引文件。
根据本申请的另一个方面,提供了一种基于容器云上部署的图像识别服务的图像识别的方法,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务服务中的业务服务包括以下至少一项:至少一个识别服务、特征提取服务、图像识别API服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;
其中,该方法包括:
通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;
通过所述图像识别API服务从所述图像识别服务对应的基础服务中的数据库服务获得所述至少一个识别服务中与所述用户图集相对应的目标识别服务,并根据所述特征提取服务的服务地址将所述待识别图片及所述目标识别服务提供给所述特征提取服务;
通过所述特征提取服务获得所述待识别图片及所述目标识别服务,提取所述待识别图片的特征信息,并根据所述目标识别服务的服务地址将所述特征信息提供给所述目标识别服务;
通过所述目标识别服务获得所述特征信息,将所述特征信息与所述目标识别服务当前已加载的索引文件进行匹配;
若匹配成功,通过所述目标识别服务获得与所述特征信息相匹配的目标索引文件对应的目标识别图信息,并将所述目标识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述目标识别图信息,从所述基础服务获得所述目标识别图信息对应的目标AR素材,并将所述目标AR素材返回至所述目标应用。
根据本申请的另一个方面,提供了一种在容器云上部署图像识别服务的网络设备,该设备包括:
一一模块,用于在部署完成图像识别服务中的基础服务后,获取所述图像识别服务中图像识别业务服务对应的部署文件,其中,所述部署文件中包含所述图像识别业务服务中每个业务服务对应的服务名称、镜像文件地址、容器集数量、配置服务地址,所述图像识别业务服务中的业务服务包括以下至少一项:图像识别管理服务、前端资源服务、索引服务、至少一个识别服务、特征提取服务、账号服务、内容管理服务、发布服务、图像识别API服务、资源存储服务;
一二模块,用于对于所述图像识别业务服务中每个业务服务,根据所述部署文件在容器云上创建容器集并启动该业务服务,通过所述容器集根据该业务服务对应的配置服务地址加载对应的配置文件,并通过容器管理平台对该业务服务进行管理,其中,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;
其中,通过所述容器云部署的所述图像识别业务服务执行以下至少任一项:
通过所述发布服务接收针对第一识别图的图像发布服务请求,获得所述第一识别图,并将所述第一识别图提供给所述索引服务;通过所述索引服务获得所述第一识别图,生成所述第一识别图对应的第一索引文件,并将所述第一索引文件对应的第一存储地址返回所述发布服务;通过所述发布服务获得所述第一存储地址,将所述第一存储地址提供给所述至少一个识别服务中与所述第一识别图对应的第一图集相对应的第一识别服务;通过所述第一识别服务获得所述第一存储地址,根据所述第一存储地址,加载所述第一索引文件;或者,
通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;通过所述图像识别API服务从所述基础服务中的数据库服务获得所述至少一个识别服务中所述用户图集对应的第二识别服务,将所述待识别图片及所述第二识别服务提供给所述特征提取服务;通过所述特征提取服务 获得所述待识别图片及所述第二识别服务,提取所述待识别图片的特征信息,并将所述特征信息提供给所述第二识别服务;通过所述第二识别服务获得所述特征信息,将所述特征信息与所述第二识别服务当前已加载的索引文件进行匹配;若匹配成功,通过所述第二识别服务获得与所述特征信息相匹配的第二索引文件对应的第二识别图信息,并将所述第二识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述第二识别图信息,从所述基础服务获得所述第二识别图信息对应的第二AR素材,并将所述第二AR素材返回至所述目标应用。
根据本申请的另一个方面,提供了一种基于容器云上部署的图像识别服务的图像发布的网络设备,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务服务中的业务服务包括以下至少一项:前端资源服务、索引服务、至少一个识别服务、内容管理服务、发布服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;
其中,该设备包括:
二一模块,用于通过所述发布服务接收针对目标识别图的图像发布服务请求,获得所述目标识别图,并根据所述索引服务的服务地址将所述目标识别图提供给所述索引服务;
二二模块,用于通过所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件对应的目标存储地址返回所述发布服务;
二三模块,用于通过所述发布服务获得所述目标存储地址,将所述目标存储地址提供给所述至少一个识别服务中与所述目标识别图对应的目标图集相对应的目标识别服务;
二四模块,用于通过所述目标识别服务获得所述目标存储地址,根据所述目标存储地址,加载所述目标索引文件。
根据本申请的另一个方面,提供了一种基于容器云上部署的图像识别服务的图像识别的网络设备,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务服务中的业务 服务包括以下至少一项:至少一个识别服务、特征提取服务、图像识别API服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;
其中,该设备包括:
三一模块,用于通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;
三二模块,用于通过所述图像识别API服务从所述图像识别服务对应的基础服务中的数据库服务获得所述至少一个识别服务中与所述用户图集相对应的目标识别服务,并根据所述特征提取服务的服务地址将所述待识别图片及所述目标识别服务提供给所述特征提取服务;
三三模块,用于通过所述特征提取服务获得所述待识别图片及所述目标识别服务,提取所述待识别图片的特征信息,并根据所述目标识别服务的服务地址将所述特征信息提供给所述目标识别服务;
三四模块,用于通过所述目标识别服务获得所述特征信息,将所述特征信息与所述目标识别服务当前已加载的索引文件进行匹配;
三五模块,用于若匹配成功,通过所述目标识别服务获得与所述特征信息相匹配的目标索引文件对应的目标识别图信息,并将所述目标识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述目标识别图信息,从所述基础服务获得所述目标识别图信息对应的目标AR素材,并将所述目标AR素材返回至所述目标应用。
根据本申请的一个方面,提供了一种在容器云上部署图像识别服务的设备,其中,该设备包括:
处理器;以及
被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器执行如下操作:
在部署完成图像识别服务中的基础服务后,获取所述图像识别服务中图像识别业务服务对应的部署文件,其中,所述部署文件中包含所述图像识别业务服务中每个业务服务对应的服务名称、镜像文件地址、容器集数量、配置服务地址,所述图像识别业务服 务中的业务服务包括以下至少一项:图像识别管理服务、前端资源服务、索引服务、至少一个识别服务、特征提取服务、账号服务、内容管理服务、发布服务、图像识别API服务、资源存储服务;
对于所述图像识别业务服务中每个业务服务,根据所述部署文件在容器云上创建容器集并启动该业务服务,通过所述容器集根据该业务服务对应的配置服务地址加载对应的配置文件,并通过容器管理平台对该业务服务进行管理,其中,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;
其中,通过所述容器云部署的所述图像识别业务服务执行以下至少任一项:
通过所述发布服务接收针对第一识别图的图像发布服务请求,获得所述第一识别图,并将所述第一识别图提供给所述索引服务;通过所述索引服务获得所述第一识别图,生成所述第一识别图对应的第一索引文件,并将所述第一索引文件对应的第一存储地址返回所述发布服务;通过所述发布服务获得所述第一存储地址,将所述第一存储地址提供给所述至少一个识别服务中与所述第一识别图对应的第一图集相对应的第一识别服务;通过所述第一识别服务获得所述第一存储地址,根据所述第一存储地址,加载所述第一索引文件;或者,
通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;通过所述图像识别API服务从所述基础服务中的数据库服务获得所述至少一个识别服务中所述用户图集对应的第二识别服务,将所述待识别图片及所述第二识别服务提供给所述特征提取服务;通过所述特征提取服务获得所述待识别图片及所述第二识别服务,提取所述待识别图片的特征信息,并将所述特征信息提供给所述第二识别服务;通过所述第二识别服务获得所述特征信息,将所述特征信息与所述第二识别服务当前已加载的索引文件进行匹配;若匹配成功,通过所述第二识别服务获得与所述特征信息相匹配的第二索引文件对应的第二识别图信息,并将所述第二识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述第二识别图信息,从所述基础服务获得所述第二识别图信息对应的第二AR素材,并将所述第二AR素材返回至所述目标应用。
根据本申请的另一个方面,提供了一种基于容器云上部署的图像识别服务的图像发布的设备,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过 容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务服务中的业务服务包括以下至少一项:前端资源服务、索引服务、至少一个识别服务、内容管理服务、发布服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;
其中,该设备包括:
处理器;以及
被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器执行如下操作:
通过所述发布服务接收针对目标识别图的图像发布服务请求,获得所述目标识别图,并根据所述索引服务的服务地址将所述目标识别图提供给所述索引服务;
通过所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件对应的目标存储地址返回所述发布服务;
通过所述发布服务获得所述目标存储地址,将所述目标存储地址提供给所述至少一个识别服务中与所述目标识别图对应的目标图集相对应的目标识别服务;
通过所述目标识别服务获得所述目标存储地址,根据所述目标存储地址,加载所述目标索引文件。
根据本申请的另一个方面,提供了一种基于容器云上部署的图像识别服务的图像识别的设备,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务服务中的业务服务包括以下至少一项:至少一个识别服务、特征提取服务、图像识别API服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;
其中,该设备包括:
处理器;以及
被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理 器执行如下操作:
通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;
通过所述图像识别API服务从所述图像识别服务对应的基础服务中的数据库服务获得所述至少一个识别服务中与所述用户图集相对应的目标识别服务,并根据所述特征提取服务的服务地址将所述待识别图片及所述目标识别服务提供给所述特征提取服务;
通过所述特征提取服务获得所述待识别图片及所述目标识别服务,提取所述待识别图片的特征信息,并根据所述目标识别服务的服务地址将所述特征信息提供给所述目标识别服务;
通过所述目标识别服务获得所述特征信息,将所述特征信息与所述目标识别服务当前已加载的索引文件进行匹配;
若匹配成功,通过所述目标识别服务获得与所述特征信息相匹配的目标索引文件对应的目标识别图信息,并将所述目标识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述目标识别图信息,从所述基础服务获得所述目标识别图信息对应的目标AR素材,并将所述目标AR素材返回至所述目标应用。
根据本申请的一个方面,提供了一种存储指令的计算机可读介质,所述指令在被执行时使得系统进行如下操作:
在部署完成图像识别服务中的基础服务后,获取所述图像识别服务中图像识别业务服务对应的部署文件,其中,所述部署文件中包含所述图像识别业务服务中每个业务服务对应的服务名称、镜像文件地址、容器集数量、配置服务地址,所述图像识别业务服务中的业务服务包括以下至少一项:图像识别管理服务、前端资源服务、索引服务、至少一个识别服务、特征提取服务、账号服务、内容管理服务、发布服务、图像识别API服务、资源存储服务;
对于所述图像识别业务服务中每个业务服务,根据所述部署文件在容器云上创建容器集并启动该业务服务,通过所述容器集根据该业务服务对应的配置服务地址加载对应的配置文件,并通过容器管理平台对该业务服务进行管理,其中,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;
其中,通过所述容器云部署的所述图像识别业务服务执行以下至少任一项:
通过所述发布服务接收针对第一识别图的图像发布服务请求,获得所述第一识别图,并将所述第一识别图提供给所述索引服务;通过所述索引服务获得所述第一识别图,生成所述第一识别图对应的第一索引文件,并将所述第一索引文件对应的第一存储地址返回所述发布服务;通过所述发布服务获得所述第一存储地址,将所述第一存储地址提供给所述至少一个识别服务中与所述第一识别图对应的第一图集相对应的第一识别服务;通过所述第一识别服务获得所述第一存储地址,根据所述第一存储地址,加载所述第一索引文件;或者,
通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;通过所述图像识别API服务从所述基础服务中的数据库服务获得所述至少一个识别服务中所述用户图集对应的第二识别服务,将所述待识别图片及所述第二识别服务提供给所述特征提取服务;通过所述特征提取服务获得所述待识别图片及所述第二识别服务,提取所述待识别图片的特征信息,并将所述特征信息提供给所述第二识别服务;通过所述第二识别服务获得所述特征信息,将所述特征信息与所述第二识别服务当前已加载的索引文件进行匹配;若匹配成功,通过所述第二识别服务获得与所述特征信息相匹配的第二索引文件对应的第二识别图信息,并将所述第二识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述第二识别图信息,从所述基础服务获得所述第二识别图信息对应的第二AR素材,并将所述第二AR素材返回至所述目标应用。
根据本申请的另一个方面,提供了一种存储指令的计算机可读介质,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务服务中的业务服务包括以下至少一项:前端资源服务、索引服务、至少一个识别服务、内容管理服务、发布服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;
其中,所述指令在被执行时使得系统进行如下操作:
通过所述发布服务接收针对目标识别图的图像发布服务请求,获得所述目标识别图,并根据所述索引服务的服务地址将所述目标识别图提供给所述索引服务;
通过所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件对应的目标存储地址返回所述发布服务;
通过所述发布服务获得所述目标存储地址,将所述目标存储地址提供给所述至少一个识别服务中与所述目标识别图对应的目标图集相对应的目标识别服务;
通过所述目标识别服务获得所述目标存储地址,根据所述目标存储地址,加载所述目标索引文件。
根据本申请的另一个方面,提供了一种存储指令的计算机可读介质,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务服务中的业务服务包括以下至少一项:至少一个识别服务、特征提取服务、图像识别API服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;
其中,所述指令在被执行时使得系统进行如下操作:
通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;
通过所述图像识别API服务从所述图像识别服务对应的基础服务中的数据库服务获得所述至少一个识别服务中与所述用户图集相对应的目标识别服务,并根据所述特征提取服务的服务地址将所述待识别图片及所述目标识别服务提供给所述特征提取服务;
通过所述特征提取服务获得所述待识别图片及所述目标识别服务,提取所述待识别图片的特征信息,并根据所述目标识别服务的服务地址将所述特征信息提供给所述目标识别服务;
通过所述目标识别服务获得所述特征信息,将所述特征信息与所述目标识别服务当前已加载的索引文件进行匹配。
与现有技术相比,本申请通过将图像识别服务部署在容器云上,可以提升图像识别服务的可移植性和安全性,并采用容器管理平台降低部署难度,增加部署灵活性,加速相关产品上线速度,还可以解决大规模图像识别服务快速扩容的技术问题,实现图像识别服务的动态扩充。
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1示出根据本申请一个实施例的一种在容器云上部署图像识别服务的方法流程图;
图2示出本申请一个示例的图像识别服务架构图;
图3示出根据本申请一个实施例的一种基于容器云上部署的图像识别服务的图像发布的方法流程图;
图4示出根据本申请一个实施例的一种基于容器云上部署的图像识别服务的图像识别的方法流程图;
图5示出根据本申请一个实施例的一种在容器云上部署图像识别服务的网络设备结构图;
图6示出根据本申请一个实施例的一种基于容器云上部署的图像识别服务的图像发布的网络设备结构图;
图7示出根据本申请一个实施例的一种基于容器云上部署的图像识别服务的图像识别的网络设备结构图;
图8示出可被用于实施本申请中所述的各个实施例的示例性系统。
附图中相同或相似的附图标记代表相同或相似的部件。
下面结合附图对本申请作进一步详细描述。
在本申请一个典型的配置中,终端、服务网络的设备和可信方均包括一个或多个处理器(例如,中央处理器(Central Processing Unit,CPU))、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(Random Access Memory,RAM)和/或非易失性内存等形式,如只读存储器(Read Only Memory,ROM)或闪存(Flash Memory)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方 法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(Phase-Change Memory,PCM)、可编程随机存取存储器(Programmable Random Access Memory,PRAM)、静态随机存取存储器(Static Random-Access Memory,SRAM)、动态随机存取存储器(Dynamic Random Access Memory,DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能光盘(Digital Versatile Disc,DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。
本申请所指设备包括但不限于用户设备、网络设备、或用户设备与网络设备通过网络相集成所构成的设备。所述用户设备包括但不限于任何一种可与用户进行人机交互(例如通过触摸板进行人机交互)的移动电子产品,例如智能手机、平板电脑等,所述移动电子产品可以采用任意操作系统,如Android操作系统、iOS操作系统等。其中,所述网络设备包括一种能够按照事先设定或存储的指令,自动进行数值计算和信息处理的电子设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑器件(Programmable Logic Device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、数字信号处理器(Digital Signal Processor,DSP)、嵌入式设备等。所述网络设备包括但不限于计算机、网络主机、单个网络服务器、多个网络服务器集或多个服务器构成的云;在此,云由基于云计算(Cloud Computing)的大量计算机或网络服务器构成,其中,云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个虚拟超级计算机。所述网络包括但不限于互联网、广域网、城域网、局域网、VPN网络、无线自组织网络(Ad Hoc网络)等。优选地,所述设备还可以是运行于所述用户设备、网络设备、或用户设备与网络设备、网络设备、触摸终端或网络设备与触摸终端通过网络相集成所构成的设备上的程序。
当然,本领域技术人员应能理解上述设备仅为举例,其他现有的或今后可能出现的设备如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。
在本申请的描述中,“多个”的含义是两个或者更多,除非另有明确具体的限定。
图1示出了根据本申请一个实施例的在容器云上部署图像识别服务的方法流程图,该方法包括步骤S11和步骤S12。在步骤S11中,在部署完成图像识别服务中的基础服务后,获取所述图像识别服务中图像识别业务服务对应的部署文件,其中,所述部署文件中包含所述图像识别业务服务中每个业务服务对应的服务名称、镜像文件地址、容器集数量、配置服务地址,所述图像识别业务服务中的业务服务包括以下至少一项:图像识别管理服务、前端资源服务、索引服务、至少一个识别服务、特征提取服务、账号服务、内容管理服务、发布服务、图像识别API服务、资源存储服务;在步骤S12中,对于所述图像识别业务服务中每个业务服务,根据所述部署文件在容器云上创建容器集并启动该业务服务,通过所述容器集根据该业务服务对应的配置服务地址加载对应的配置文件,并通过容器管理平台对该业务服务进行管理,其中,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;其中,通过所述容器云部署的所述图像识别业务服务执行以下至少任一项:通过所述发布服务接收针对第一识别图的图像发布服务请求,获得所述第一识别图,并将所述第一识别图提供给所述索引服务;通过所述索引服务获得所述第一识别图,生成所述第一识别图对应的第一索引文件,并将所述第一索引文件对应的第一存储地址返回所述发布服务;通过所述发布服务获得所述第一存储地址,将所述第一存储地址提供给所述至少一个识别服务中与所述第一识别图对应的第一图集相对应的第一识别服务;通过所述第一识别服务获得所述第一存储地址,根据所述第一存储地址,加载所述第一索引文件;或者,通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;通过所述图像识别API服务从所述基础服务中的数据库服务获得所述至少一个识别服务中所述用户图集对应的第二识别服务,将所述待识别图片及所述第二识别服务提供给所述特征提取服务;通过所述特征提取服务获得所述待识别图片及所述第二识别服务,提取所述待识别图片的特征信息,并将所述特征信息提供给所述第二识别服务;通过所述第二识别服务获得所述特征信息,将所述特征信息与所述第二识别服务当前已加载的索引文件进行匹配;若匹配成功,通过所 述第二识别服务获得与所述特征信息相匹配的第二索引文件对应的第二识别图信息,并将所述第二识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述第二识别图信息,从所述基础服务获得所述第二识别图信息对应的第二AR素材,并将所述第二AR素材返回至所述目标应用。
在一些实施例中,容器化技术(docker)用于支持创建和使用Linux容器,docker利用Linux核心中的资源分离机制,例如cgroups,以及Linux核心名字空间(namespaces),来创建独立的容器(containers)。容器化是软件开发的一种方法,通过该方法可将应用程序或服务、其依赖项及其配置(抽象化为部署清单文件)一起打包为容器映像,软件容器充当软件部署的标准单元。
在一些实施例中,容器管理平台(包括但不限于Kubernetes(K8s)、Swam、Meso等,其中,Kubernetes提供了一个可弹性运行分布式系统的框架,上下文中以Kubernetes为例来对容器管理平台进行说明),用于部署、扩展和管理容器化(containerized)应用程序,因此可以将运行Linux容器的多组主机聚集在一起,由Kubernetes高效地管理这些集群,而且,这些集群可跨公共云、私有云或混合云部署主机。
在一些实施例中,Kubernetes是由一组节点组成,这些节点可以是物理主机,也可以是虚拟机。Kubernetes平台运行这些节点之上,构成了集群。Kubernetes集群包括Master Node(主机节点)和用于实际部署的Pod的工作Node(节点)。一个集群往往由多个Master Node,这几个Master Node控制着整个集群的所有Node,所有任务分配都来自于Master Node。Master Node控制整个集群,做出关于群集的全局决策(例如调度),以及检测和响应群集事件。Node是K8s集群中真正的工作负载节点,K8s集群由多个Node共同承担工作负载,支持动态在集群中添加或删除Node。Pod(容器集)被分配到某个具体的Node上执行,且包含一个或多个容器的容器组。同一容器集中的所有容器共享同一个IP地址、IPC、主机名称及其它资源。容器从属于Pod,在运行应用、库及其依赖的微服务中,容器是最低层级的,通过绑定一个外部IP,容器可以被外网访问。
在一些实施例中,Kubernetes主节点(Master Node)从外部接受指令,再把指令转交给附属的Node(节点),这种带有大量服务的切换工作自动决定最适合该任务的节点,然后在该节点上分配资源并指派Pod(容器集)来完成任务请求。在一 些实施例中,图像识别服务中的各个业务服务封装在docker镜像中,在Kubernetes中的各个Pod中运行。
在一些实施例中,容器云平台是在云端把容器技术和容器管理平台结合起来,提供构建、发布和运行分布式应用的平台,以下简称容器云。在一些实施例中,容器云运行在多组服务器(例如,x64服务器、x86服务器)之上,在容器云上部署图像识别服务中的多个业务服务,并通过Kubernetes来对容器云上部署的图像识别服务中的这些业务服务进行管理,可以解决大规模图像识别服务快速扩容的技术问题,实现图像识别服务的负载均衡和动态扩充,解决不同系统和不同硬件环境部署的差异问题,提升服务的可移植性和安全性,降低部署难度,增加部署灵活性,加速相关产品上线速度。
在一些实施例中,所述图像识别服务中的基础服务包括以下至少一项:数据库、缓存数据库、文件存储、配置、镜像仓库、配置编辑器等相关的基础类服务,所述基础服务可以部署在容器云上,也可以部署在容器云的外围(如外部的实体云服务器上),优选地,所述基础服务部署在容器云的外围。
在一些实施例中,在部署完成图像识别服务中的基础服务后,k8s获取图像识别服务中的图像识别业务服务对应的部署文件,部署文件是启动图像识别业务服务的基础文件,里面指定了k8s所需要的基础内容,如在部署文件中指定图像识别业务服务中的每个业务服务的服务名称、镜像文件地址、容器集数量、容器集运行时的环境变量(如配置服务的地址等),进一步地,环境变量中还可以指定配置项key,更进一步地,部署文件中还可以指定每个业务服务的service(SVC)的内容(包括对外暴露的端口等内容)等,k8s根据部署文件创建容器集并在容器集上启动图像识别业务服务中的每个业务服务,图像识别业务服务包括以下至少一项:图像识别管理服务、前端资源服务、索引服务、识别服务、特征提取服务、账号服务、内容管理服务、发布服务、图像识别API服务、资源存储服务,其中,部署文件可以为一个或多个,在此不进行限定。在一些实施例中,每个业务服务对应同一个配置服务地址,在另一些实施例中,每个业务服务对应不同的配置服务地址,在此不进行限定。在此并不对不同业务服务之间的部署先后顺序作任何的限定。在一些实施例中,所述图像识别管理服务用于执行服务控制,如控制识别服务器的分配等。所述前端资源服务是用于管理后台或web网页前端,同时是对应客户端计入的入口服务。 在一些实施例中,按照业务逻辑进行划分,图像识别业务服务包括依赖于所述基础服务的第二层服务、依赖于所述第二层服务的第一层服务,其中,所述第二层服务用于提供偏向于底层算法功能类型的服务(如索引服务、识别服务、特征提取服务等至少一项服务),与具体的相关的业务逻辑关联性小,所述第一层服务用于提供偏向于上层业务逻辑类型的服务(如账号服务、内容管理服务、发布服务、图像识别API服务等至少一项服务),与具体的业务逻辑关联性大,其中,需要注意的是,所述第一层服务和第二层服务是根据业务逻辑进行划分的,并不表示部署上存在层级划分,仅用于方便理解业务逻辑。依赖是指依赖方直接或间接使用或调用或更新被依赖方的数据、功能、接口等,例如第一层服务中的发布服务需要调用第二层服务中的索引服务;又例如,第一层服务中的内容管理服务更新基础服务中的数据库内容等。图2为本申请一个示例的服务架构图,其中,所有业务服务和配置编辑器存放在镜像仓库中,在容器云创建服务之后配置镜像地址,服务启动之后从配置服务(etcd)获取对应的配置,初始化mysql数据库表和数据,完成服务架构的搭建;其中,集群服务入口为前端资源服务(webhiar),服务请求转发到账号服务(accountsrv)、内容管理服务(contentsrv)、发布服务(publishsrv)、图像识别API服务(recognizesrv)等第一层服务,第一层依赖索引服务(包括云索引服务(cloudkey)、本地索引服务(localkey))、识别服务(searchsrv)、特征提取服务(featuresrv)等第二层服务,第二层服务依赖数据库服务mysql、文件存储服务fastdfs、资源存储服务(storagesrv)等基础服务。其中,webhiar作为访问入口,用于部署管理后台或web网页前端的API的入口服务,应用的访问及应用端的API请求都由此节点为入口,当出现并发的访问时,可以在该部署的服务器之前搭建负载均衡的后面,根据不同的请求的压力,架构中不同的服务可以进行节点的扩充。需要说明的是,上述所涉及的各项服务将在后续实施例中予以详述。在一些实施例中,通过将图像识别服务部署在容器云上,可以提升图像识别服务的可移植性和安全性。
在一些实施例中,对于所述图像识别业务服务中每个业务服务,根据部署文件中的每个业务服务对应的服务名称、镜像文件地址、容器集数量等部署信息,在容器云上创建容器集并启动该业务服务,所述容器集根据部署文件中的配置服务地址,从配置服务中加载该业务服务对应的配置文件(例如,配置服务中包括多个不同的业务服务分别对应的配置文件,可以通过该业务服务的服务名称在配置服务中 找到该业务服务对应的配置文件并加载),并通过容器管理平台(例如,k8s)对容器云上已部署的图像识别业务服务中的至少一个服务进行管理。在一些实施例中,业务服务启动时需要加载配置文件,配置文件里面为业务服务运行时需要的内容,通常包含业务服务占用的端口号、连接的数据库地址、缓存服务器的地址、依赖(需要调用)的其他业务服务的服务地址等信息。在一些实施例中,K8S根据部署文件中业务服务对应的容器集数量,在容器云上创建该业务服务对应的、所述容器集数量的容器集,根据部署文件中该业务服务对应的镜像文件地址,下载该业务服务对应的镜像文件,并根据该镜像文件在所述容器集上开始启动该业务服务,然后根据部署文件设置环境变量,所述容器集读取环境变量中设置的配置服务的地址,从配置服务中加载该业务服务对应的配置文件,并根据配置文件的内容完成该业务服务的启动,然后该业务服务可以处理业务请求。
在一些实施例中,若基础服务部署在容器云上,则可以通过容器管理平台对部署在容器云上的基础服务和图像识别业务服务中的至少一个服务进行管理。在另一些实施例中,若基础服务部署在容器云的外围服务上,则可以通过容器管理平台对部署在容器云上的图像识别业务服务中的至少一个服务进行管理。在一些实施例中,k8s主节点(Master Node)从外部接受指令,再把指令转交给附属的Node(节点),然后在该节点上分配资源并指派Pod(容器集)来完成任务请求。在一些实施例中各个服务封装在docker镜像中,在k8s中的各个Pod中运行。在一些实施例中,通过k8s来对容器云上部署的图像识别服务进行管理,可以解决大规模图像识别服务快速扩容的技术问题,实现图像识别服务的负载均衡和动态扩充,降低部署难度,增加部署灵活性,加速相关产品上线速度。
在一些实施例中,配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务。例如,发布服务依赖于索引服务及其他业务服务,发布服务需要调用索引服务及其他业务服务,则发布服务对应的配置文件中包含索引服务的服务名称与索引服务地址之间的映射关系以及其他业务服务的服务名称与其他业务服务地址之间的映射关系,当发布服务需要调用索引服务时,可以通过配置文件中的索引服务的服务名称与服务地址之间的映射关系,来获取索引服务的服务地址,从而发布服务可以根据索引服务的服务地址来调用索引服务。
在一些实施例中,所述第二层服务包括以下至少一项:
1)索引服务
在一些实施例中,所述索引服务为云索引服务(cloudkey),或者本地索引服务(localkey),或者同时包括云索引服务和本地索引服务;所述云索引服务用于生成图片的云端识别的索引文件,用于云端识别应用;所述本地索引服务用于生成本地识别需要的索引文件,用于本地识别应用。索引是指提取的图片的特征。
在一些实施例中,所述索引服务接受索引识别请求,通过本地索引、云索引生成索引,保存索引文件到文件存储服务,并返回存储地址。
2)识别服务
所述识别服务(searchsrv)用于提供图片的识别算法的基础服务、核心服务。在一些实施例中,所述识别服务接受识别请求,检索本机的识别库中存储的索引文件,返回匹配成功的识别图片的标识信息(如ID)。
3)特征提取服务
所述特征提取服务(featuresrv)是识别时的前置服务,用于提取识别图片的特征。
在一些实施例中,第二层服务可以是一个或多个,可以根据客户端请求的压力及流量情况进行动态扩充。需要说明的是,上述第二层服务仅为举例,而非对本申请的限制。
在一些实施例中,所述第一层服务包括以下至少一项:
1)内容管理服务
所述内容管理服务(contentsrv)用于提供识别图库、AR素材及AR场景的相关管理服务。在一些实施例中,所述内容管理服务包括了应用管理、资源管理、图集管理和AR场景管理,还可以包括将识别图片和AR素材绑定。
2)发布服务
所述发布服务(publishsrv)是发布图片到识别服务的管理服务,用于控制图集的发布,属于核心服务。在一些实施例中,所述发布服务对已有的识别服务器进行管理、分配,接受图片的发布请求,调用索引生成模块,分配识别服务器,以使识别服务器调用对应索引加载模块进行索引文件的加载。
3)图像识别API服务
所述图像识别API服务(recognizesrv)提供客户端图片识别、资源获取、本地识 别索引文件下载等API的接口服务。在一些实施例中,所述图像识别API服务用于:调用发布管理服务获取识别服务器信息;调用图像识别服务进行图片的检索,获取识别接口,查询数据,返回图像对应的AR素材。
4)账号服务
所述账号服务用于提供与账号管理相关的服务,如管理用户、企业相关信息。在一些实施例中,第一层服务可以是一个或多个,可以根据客户端请求的压力及流量情况进行动态扩充。需要说明的是,上述第一层服务仅为举例,而非对本申请的限制。
在一些实施例中,所述基础服务包括以下至少一项:
1)配置服务
所述配置服务(etcd)用于提供相应服务的配置。在一些实施例中,配置服务用于共享配置和服务发现的分布式、一致性的KV存储系统,通过配置服务的管理页面,可修改和创建相应服务的配置。在一些实施例中,本申请服务架构采用共享配置服务。
2)数据库服务
数据库服务用于存储系统的数据,例如,数据库服务可以使用关系型数据库,以二维表的方式存储文本数据,包括但不限于mysql数据库。在一些实施例中,本申请包括但不限于四个数据库:账户数据库、内容数据库,发布数据库和识别服务器数据库。其中,账户数据库保存用户、企业信息等;内容数据库包括图集、图片的属性信息(图片ID、名称、所属图集、大小、类型、发布状态、所属用户等)、AR效果绑定信息、资源信息(视频、音乐、模型等)等;发布数据库存储发布服务器的信息及图片发布信息,包括图片ID、所属图集、索引文件地址、对应识别服务器等;识别服务器数据库为每一个识别服务生成一张记录表,包括加载的识别图的ID、索引文件地址、图集、发布时间等。在另一些实施例中,可以建立一个或多个数据库来保存上述信息,这里不进行限定。
3)文件存储服务
所述文件存储服务用于提供与文件(例如,图片文件、索引文件、视频、音乐、模型等资源文件)存储相关的服务。在一些实施例中,所述文件存储服务包括但不限于fastdfs等任何与文件存储相关的服务。
4)缓存数据库服务
例如,所述缓存数据库服务可以是redis(Remote Dictionary Server)。
5)镜像仓库服务
所述镜像仓库服务(harbor)用于提供镜像存储、分发的服务。
6)配置编辑器服务
所述配置编辑器服务(etcdkeeper)用于提供应用配置文件编辑服务。
在一些实施例中,基础服务可以在容器云内部运行,也可以在容器云的外围运行。在一些实施例中,基础服务可以动态扩充。需要说明的是,上述基础服务仅为举例,而非对本申请的限制。
在一些实施例中,所述方法还包括:在所述容器云上部署资源存储服务(storagesrv)。在一些实施例中,所述资源存储服务用于提供文件存储的中间服务,封装标准的存储接口给到其他服务,后面可对接多种存储服务。所述资源存储服务相当于适配器,用于适配不同的文件存储格式。在一些实施例中,所述资源存储服务需要部署在容器云的内部,不可以部署在容器云的外围。
在一些实施例中,所述对于所述图像识别业务服务中每个业务服务,根据所述部署文件在容器云上创建容器集并启动该业务服务,包括:对于所述图像识别业务服务中每个业务服务,根据所述部署文件中该业务服务对应的容器集数量,在容器云上创建该业务服务对应的、所述容器集数量的容器集,根据所述部署文件中该业务服务对应的镜像文件地址,下载该业务服务对应的镜像文件,并根据该镜像文件在所述容器集上启动该业务服务。在一些实施例中,容器集启动该业务服务的过程中,所述容器集还需加载配置文件,以完成该识别服务的启动。
在一些实施例中,所述图像识别管理服务用于管理所述至少一个识别服务;其中,所述方法还包括:对于所述至少一个识别服务中的每个识别服务,在该识别服务启动时,根据所述图像识别管理服务的域名信息和/或地址信息,向所述图像识别管理服务发送注册信息;通过所述图像识别管理服务接收所述注册信息,根据所述注册信息生成该识别服务的相关信息,并将该识别服务的相关信息存储于所述基础服务中的数据库服务。在一些实施例中,每个识别服务会记录图像识别管理服务的域名信息和/或地址信息,每个识别服务启动后,会根据图像识别管理服务的域名信息和/或地址信息,主动向图像识别管理服务发送包括该识别服务的标识信息(例如, 识别服务的ID、名称、地址)在内的注册信息,告知图像识别管理服务该识别服务是可使用的状态,图像识别管理服务接收该注册信息,并将该注册信息写入基础服务中的数据库服务,在数据库服务中生成该识别服务的相关信息(例如,当前加载的识别图的ID、索引文件地址、图集、发布时间等),以记录当前有多少已启动的识别服务以及每个已启动的识别服务的相关信息,后续图像识别管理服务会定时监测所有已启动的识别服务的运行情况,当发现某个已启动的识别服务宕机时,会根据该宕机的识别服务的标识信息,从数据库服务中查找获得该宕机的识别服务的相关信息。
在一些实施例中,所述方法还包括:对于所述至少一个识别服务中的每个已启动的识别服务,通过该已启动的识别服务定时向所述图像识别管理服务发送心跳信息;若所述图像识别管理服务在预定时间间隔内未收到所述至少一个识别服务中的第三识别服务发送的心跳信息,则在所述至少一个识别服务中确定第四识别服务,从所述基础服务中的数据库服务获得所述第三识别服务对应的当前加载图集信息,以在所述第四识别服务中加载所述当前加载图集信息所对应的图集。在一些实施例中,每个识别服务会定时向图像识别管理服务发送心跳信息,以使图像识别管理服务基于心跳信息确定每个识别服务是否以及何时出现故障或宕机,例如,每个识别服务每隔预定时间便向图像识别管理服务发送心跳信息,图像识别管理服务若接收到某个识别服务的心跳信息,则可确定该识别服务还在运行,图像识别管理服务若相隔预定时间没有接收到某个识别服务的心跳信息,则表示该识别服务宕机。在一些实施例中,若图像识别管理服务在预定时间间隔内未收到第三识别服务发送的心跳信息,则可确定该第三识别服务宕机,图像识别管理服务会从已注册的识别服务(已注册的识别服务中可能包括在该第三识别服务宕机之后新启动的识别服务,也可能包括在该第三识别服务宕机之前已启动的识别服务)中确定第四识别服务,之后,图像识别管理服务从数据库服务获得第三识别服务对应的当前加载图集信息,并通知第四识别服务,以在第四识别服务中加载当前加载图集信息所对应的图集,其中,当前加载图集信息可以是与识别服务当前加载的图集相关的任何信息,例如,当前是否加载图集、当前加载的图集数量、当前加载的每个图集的标识信息、当前加载的每个图集中的识别图以及数量、当前加载的每个图集中的识别图对应的索引文件、索引文件地址等任一项信息。在此需要说明的是,上下文中的“加载图集” 是指识别服务加载图集中的一个或多个识别图分别对应的一个或多个索引文件,如所述在第四识别服务中加载当前加载图集信息所对应的图集包括在第四识别服务中加载当前加载图集信息所对应的图集中的识别图对应的索引文件。
在一些实施例中,所述在所述至少一个识别服务中确定第四识别服务,包括:若所述图像识别管理服务接收到所述至少一个识别服务中的新启动的第五识别服务发送的注册信息,通过所述图像识别管理服务将所述第五识别服务确定为所述第四识别服务。在一些实施例中,若图像识别管理服务在预定时间间隔内未收到第三识别服务发送的心跳信息,图像识别管理服务等待新的识别服务启动并到图像识别管理服务注册,将新启动注册的第五识别服务作为第四识别服务,然后图像识别管理服务从数据库服务中读取第三识别服务对应的当前加载图集信息,并通知第四识别服务,以在第四识别服务中加载当前加载图集信息所对应的图集。例如,图像识别管理服务中已注册的识别服务包括M1、M2、M3,每个识别服务每隔30秒会向图像识别管理服务发送心跳信息,当图像识别管理服务隔30秒没有收到来自M1的心跳信息时,图像识别管理服务确定M1宕机;之后,若图像识别管理服务接收到新启动的识别服务M4发送的注册信息,则将识别服务M4确定为第四识别服务,然后M4加载M1当前加载图集信息对应的图集,如加载当前加载图集信息对应的图集中的识别图对应的索引文件。
在一些实施例中,所述在所述至少一个识别服务中确定第四识别服务,包括:通过所述图像识别管理服务从所述数据库服务获取所述至少一个识别服务中的每个已启动的识别服务的当前加载图集信息;通过所述图像识别管理服务根据所述每个已启动的识别服务的当前加载图集信息,确定第四识别服务,其中,所述第四识别服务满足以下至少一项:当前未加载任何图集;当前已加载的图集数量最少;当前已加载的图集中识别图像数量最少。在一些实施例中,所述当前加载图集信息可以是与识别服务当前加载的图集相关的任何信息,例如,当前是否加载图集、当前加载的图集数量、当前加载的每个图集的标识信息、当前加载的每个图集中的识别图以及数量、当前加载的每个图集中的识别图对应的索引文件、索引文件地址等任一项信息。例如,图像识别管理服务中已注册的识别服务包括M1、M2、M3,每个识别服务每隔30秒会向图像识别管理服务发送心跳信息,当图像识别管理服务隔30秒没有收到来自M1的心跳信息时,图像识别管理服务确定M1宕机,则从数据 库服务获得当前已启动的M2和M3所分别对应的当前加载图集信息,之后从M2和M3中选择当前未加载任何图集的M3作为第四识别服务,或者选择加载图集中识别图像数量较少的M3作为第四识别服务。
在一些实施例中,所述方法还包括:对于待处理图像服务请求,若所述待处理图像服务请求对应的目标业务服务已部署在多个容器集上,通过所述容器管理平台根据所述多个容器集中每个容器集的负荷信息,从所述多个容器集中确定目标容器集,并通过所述目标容器集上部署的所述目标业务服务来处理所述待处理图像服务请求。在一些实施例中,图像服务请求包括但不限于用于图像发布服务的发布请求、用于图像识别服务的识别请求等,对于每个待处理的图像服务请求,要通过容器云中的多个不同业务服务来共同处理完成本次图像服务请求,其中,多个不同业务服务中的每个业务服务可以部署在容器云中的一个容器集上,也可以部署在容器云中的多个不同容器集上。在一些实施例中,对于每个待处理图像服务请求,先获取用于处理本次图像服务请求的多个业务服务,对于多个业务服务中的每个业务服务,若该业务服务部署在多个不同容器集上,则需要根据每个容器集的负荷信息,其中,负荷信息可以是容器集的CPU负荷或内存负荷,从多个容器集中选择负荷较小的目标容器集,并通过目标容器集上部署的该业务服务来处理本次图像服务请求,以此可以实现负载均衡的目的。例如,待处理图像服务请求为图像发布服务的发布请求,在一些实施例中,该请求包括发布服务、索引服务和识别服务,若容器云上部署发布服务、索引服务和识别服务的容器集的个数分别是二、三、一,则根据部署了发布服务的两个容器集的负荷信息,确定负荷信息最小的目标容器集(目标发布服务),同样地,根据部署了索引服务的三个容器集的负荷信息,确定负荷信息最小的目标容器集(目标索引服务),并通过该目标发布服务、目标索引服务和识别服务来处理本次发布请求。
在一些实施例中,所述方法还包括:通过所述容器管理平台监控已创建的一个或多个容器集的运行状态信息,若监控到目标容器集的负荷信息满足预定扩容条件,创建一个或多个第二目标容器集,并在所述一个或多个第二目标容器集上部署所述目标容器集对应的业务服务。在一些实施例中,容器管理平台监控容器云上已创建的一个或多个容器集中的每个容器集的负荷信息,若监控到其中的某个目标容器集所对应的负荷信息满足预定扩容条件(例如,目标容器集所对应的负荷信息超 过预定的负荷阈值),创建一个或多个第二目标容器集,并在该一个或多个第二目标容器集上部署目标容器集对应的业务服务,从而通过自动扩容来减轻目标容器集的负荷。例如,若监控到目标容器集的CPU负荷超过80%,则自动扩充一个第二目标容器集来部署并运行目标容器集对应的业务服务,以降低目标容器集的CPU负荷,从而解决大规模图像识别服务自动扩容的技术问题。如当前存在多个待识别图片的识别请求,需要特征提取服务对多个待识别图片进行特征提取,当目前的特征提取服务所在的容器集的负荷信息满足预定扩容条件时,容器管理平台则扩充一个或多个容器集(每个容器集部署特征提取服务)并启动一个或多个特征提取服务来处理多个待识别图片的特征提取,以实现负载均衡。
在一些实施例中,所述方法还包括:响应于针对目标容器集的扩容指令,通过所述容器管理平台创建一个或多个第二目标容器集,并在所述一个或多个第二目标容器集上部署所述目标容器集对应的业务服务。在一些实施例中,扩容指令包括但不限于针对哪个目标容器集(对应业务服务)执行扩容操作以及针对该目标容器集扩充几个第二目标容器集。在一些实施例中,响应于针对目标容器集的扩容指令,在容器云上创建一个或多个第二目标容器集,并在该一个或多个第二目标容器集上部署目标容器集对应的业务服务,从而通过手动扩容来减轻目标容器集的负荷,从而解决大规模图像识别服务快速扩容的技术问题。
在一些实施例中,所述方法还包括:若所述容器管理平台确定目标用户图集满足预定的并发加载条件,确定所述目标用户图集对应的一个或多个并发识别服务;通过所述一个或多个并发识别服务中每个并发识别服务分别加载所述目标用户图集。在一些实施例中,若容器管理平台确定目标用户图集满足预定的高并发加载条件(例如,目标用户图集的并发访问量超过预定的并发访问量阈值),分配一个或多个并发识别服务同时加载目标用户图集,可以解决指定图集并发量高的问题。
在一些实施例中所述确定所述目标用户图集对应的一个或多个并发识别服务,包括:从所述至少一个识别服务中已部署的识别服务中确定所述目标用户图集对应的一个或多个并发识别服务。在一些实施例中,从容器云上当前已部署的至少一个识别服务中确定加载目标用户图集的一个或多个并发识别服务,例如,可以根据容器云上当前已部署的至少一个识别服务中的每个识别服务的负荷状态,将其中负荷较小的一个或多个识别服务作为并发识别服务,并加载目标用户图集。又如,根据 容器云上当前已部署的至少一个识别服务中的每个识别服务的当前加载图集信息,将其中加载识别图对应索引文件数量较少的一个或多个识别服务作为并发识别服务,并加载目标用户图集。
在一些实施例中,所述确定所述目标用户图集对应的一个或多个并发识别服务,包括:创建一个或多个第二目标容器集,在所述一个或多个第二目标容器集中每个第二目标容器集上分别部署一个或多个第六识别服务,并将所述一个或多个第六识别服务作为所述目标用户图集对应的一个或多个并发识别服务。在一些实施例中,在容器云上创建一个或多个第二目标容器集,并在该一个或多个第二目标容器集中的每个第二目标容器集上分别部署一个或多个第六识别服务,并将该一个或多个第六识别服务作为并发识别服务,并加载目标用户图集,其中,每个第二目标容器集上可以分别只部署一个第六识别服务,或者,还可以每个第二目标容器集上分别部署多个第六识别服务。
在一些实施例中,所述方法还包括若所述容器管理平台确定目标用户图集满足预定的划分条件,将所述目标用户图集划分为互不相交的多个子集,其中,所述多个子集中的每个子集包括至少一个识别图;确定所述目标用户图集对应的一个或多个识别服务;通过所述一个或多个识别服务中的每个识别服务分别加载所述多个子集中的一个子集,其中,不同识别服务对应不同子集。在一些实施例中,若确定目标用户图集满足预定的划分条件(例如,目标用户图集中的识别图数量超过预定的数量阈值),将目标用户图集划分为互不相交的多个子集,每个子集中包括至少一个识别图,容器管理平台确定多个识别服务分别各自加载一个不同的子集,从而解决图集及图片数量增多,容器不足的问题。在一些实施例中,所述确定所述目标用户图集对应的一个或多个识别服务,包括:从已部署的至少一个识别服务中确定所述目标用户图集对应的一个或多个识别服务;在另一些实施例中,所述确定所述目标用户图集对应的一个或多个识别服务,包括:创建一个或多个第二目标容器集,在所述一个或多个第二目标容器集上部署一个或多个识别服务,并将所述一个或多个识别服务作为所述目标用户图集对应的一个或多个识别服务。
图3示出了根据本申请一个实施例的基于容器云上部署的图像识别服务的图像发布的方法流程图,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务 服务中的业务服务包括以下至少一项:前端资源服务、索引服务、至少一个识别服务、内容管理服务、发布服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;其中,该方法包括步骤S21、步骤S22、步骤S23和步骤S24。在步骤S21中,通过所述发布服务接收针对目标识别图的图像发布服务请求,获得所述目标识别图,并根据所述索引服务的服务地址将所述目标识别图提供给所述索引服务;在步骤S22中,通过所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件对应的目标存储地址返回所述发布服务;在步骤S23中,通过所述发布服务获得所述目标存储地址,将所述目标存储地址提供给所述至少一个识别服务中与所述目标识别图对应的目标图集相对应的目标识别服务;在步骤S24中,通过所述目标识别服务获得所述目标存储地址,根据所述目标存储地址,加载所述目标索引文件。
在一些实施例中,上下文中的“发布”是指将目标识别图添加到识别服务器或将目标识别图对应的索引文件加载到识别服务器,以提供检索。例如,用户在前端资源服务界面中上传目标识别图,并针对目标识别图执行一系列操作,如将目标识别图加入某个现有图集或新建图集并将物料图片放入该新建图集,又如将目标识别图与某个AR素材进行绑定,内容管理服务响应于用户针对目标识别图执行的相关操作信息,获得目标识别图及目标识别图对应的图集信息,在一些实施例中,还可以获得目标识别图所绑定的AR素材,并以此在数据库服务中更新该目标识别图的相关信息,其中,所述相关信息包括以下任一项:目标识别图的标识信息、目标识别图的存储地址、目标识别图对应的图集的标识信息、目标识别图所绑定的AR素材的标识信息、目标识别图所绑定的AR素材的存储地址等,生成针对目标识别图的图像发布服务请求并发送给发布服务,在一些实施例中,该图像发布服务请求包括目标识别图,其中,所述目标识别图可以是目标识别图本身,也可以是目标识别图的标识信息,如名称,ID等。或者,该图像发布服务请求除包括目标识别图外,还可以包括目标识别图对应的图集的信息(例如,图集的标识等)。在一些实施例中,发布服务启动时会根据部署文件中的配置服务地址,从配置服务加载发布服务 对应的配置文件,该配置文件中包括发布服务所依赖的索引服务的服务地址,发布服务接收到针对目标识别图的图像发布服务请求后,获得该图像发布服务请求对应的目标识别图(可以是目标识别图本身,或目标识别图的标识信息,如名称,ID等),并根据配置文件中的索引服务的服务地址,将目标识别图或目标识别图的标识信息提供给索引服务,本地索引服务或云索引服务生成目标识别图对应的索引文件(本地索引服务用于生成本地识别的索引文件,云索引服务用于生成云端识别的索引文件,两个索引服务对应的特征提取算法可以相同或者不同),生成后的索引文件会存储到文件存储服务,并将索引文件对应的索引文件存储地址返回给发布服务,发布服务将存储地址提供给目标识别图所对应的图集所对应的识别服务,由识别服务根据索引文件存储地址从文件存储服务加载对应的索引文件到内存,以提供目标识别图的识别服务。在一些实施例中,识别服务加载索引文件后,更新数据库服务中该目标识别图对应的相关信息,例如更新目标识别图的发布状态,更新目标识别图对应的图集所对应的识别服务器信息等。其中,发布服务获取目标识别图对应的图集信息可以通过图像发布服务请求所包含的信息中获取目标识别图对应的图集的信息,还可以通过发布服务到数据库服务中获取目标识别图对应的图集的信息,在此不做限定。在一些实施例中,所述图像识别业务服务中的业务服务还包括账户服务,账户服务用于提供与账号管理相关的服务,如管理用户、企业相关信息等。
在一些实施例中,所述方法还包括在所述步骤S21之前:通过所述前端资源服务接收用户针对目标识别图的操作信息,将所述操作信息转发到内容管理服务;通过所述内容管理服务根据所述操作信息,获得所述目标识别图及所述目标识别图对应的目标图集,更新所述图像识别服务对应的基础服务中的数据库服务中的所述目标识别图的相关信息,生成针对所述目标识别图的图像发布服务请求并发送至所述发布服务。在一些实施例中,用户在前端资源服务界面中上传目标识别图,并针对目标识别图执行一系列操作,如将目标识别图加入某个现有图集或新建图集并将目标识别图放入该新建图集,又如将目标识别图与某个AR素材进行绑定,前端资源服务接收用户针对目标识别图执行的相关操作信息,并该相关操作信息转发给内容管理服务,内容管理服务根据接收到的该相关操作信息,获得目标识别图及目标识别图片对应的图集,在一些实施例中,还可以获得目标识别图所绑定的AR素材,并以此在数据库服务中更新目标识别图的相关信息,其中,所述相关信息包括以下 任一项:目标识别图的标识信息、目标识别图的存储地址、目标识别图对应的图集的标识信息、目标识别图所绑定的AR素材的标识信息、目标识别图所绑定的AR素材的存储地址等,生成针对目标识别图的图像发布服务请求并发送给发布服务。在一些实施例中,图像发布服务请求可以只包括目标识别图,其中,所述目标识别图可以是目标识别图本身,也可以是目标识别图的标识信息,如名称,ID等。或者,图像发布服务请求还可以同时包括目标识别图和目标识别图对应的图集的信息(例如,图集的标识等)。
在一些实施例中,所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件对应的目标存储地址返回所述发布服务,包括:通过所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件提供给所述基础服务中的文件存储服务;通过所述文件存储服务获得所述目标索引文件,存储并获得所述目标索引文件对应的目标存储地址,并将所述目标存储地址返回所述索引服务;通过所述索引服务获得所述目标存储地址,并将所述目标存储地址返回所述发布服务。在一些实施例中,索引服务在获得发布服务提供的目标识别图(可以是目标识别图本身,也可以是目标识别图的标识信息等)后,生成该目标识别图片对应的索引文件,并将该索引文件提供给基础服务中的文件存储服务进行存储,文件存储服务在该索引文件存储完成后,将对应的存储地址返回给索引服务,然后索引服务再将该存储地址返回给发布服务。在一些实施例中,所述图像识别业务服务中的业务服务还包括资源存储服务,所述资源存储服务用于提供文件存储的中间服务,封装标准的存储接口给到其他服务,后面可对接多种文件存储服务。所述资源存储服务相当于适配器,用于适配不同的文件存储格式,如七牛云,小米云,fastdfs等不同的文件存储服务。在一些实施例中,所述索引服务将所述目标索引文件提供给所述基础服务中的文件存储服务进一步包括,索引服务先利用资源存储服务将目标索引文件进行转换,然后将转换后的索引文件发送给文件存储服务进行存储。
在一些实施例中,所述通过所述发布服务将所述目标存储地址提供给所述至少一个识别服务中与所述目标识别图对应的目标图集相对应的目标识别服务,包括:通过所述发布服务从所述图像识别服务对应的基础服务中的数据库服务获得所述目标图集对应的发布状态指示信息;若所述发布状态指示信息指示所述目标图集已 发布,通过所述发布服务从所述数据库服务获得所述至少一个识别服务中所述目标图集对应的目标识别服务,并根据所述目标识别服务的服务地址将所述目标存储地址提供给所述目标图集对应的目标识别服务;若所述发布状态信息指示所述目标图集未发布,通过所述发布服务从所述至少一个识别服务中已部署的识别服务中确定目标识别服务,并根据所述目标识别服务的服务地址将所述目标存储地址提供给所述目标识别服务。在一些实施例中,所述发布状态指示信息用于指示所述目标图集的发布状态,包括但不限于已发布、未发布、发布中等,发布服务从数据库服务中查询获得目标图集对应的发布状态,若目标图集已发布,从数据库服务中查询获得目标图集对应的目标识别服务(可以是目标识别服务的标识信息,如名称、地址等),并将目标索引文件的存储地址提供给该目标识别服务;若目标图集未发布,则从至少一个识别服务中确定目标识别服务,并将目标索引文件的存储地址提供给该确定的目标识别服务。在一些实施例中,对于新增的未发布的图集,寻找加载图片数量少/负荷小的识别服务优先发布,对于已发布的图集,从数据库服务中查询到相关识别服务的信息,通知对应的识别服务加载该目标识别图对应的索引文件。
在一些实施例中,所述通过所述发布服务从所述至少一个识别服务中已部署的识别服务中确定目标识别服务,包括:通过所述发布服务从所述数据库服务获得所述至少一个识别服务中已部署的识别服务对应的当前加载图集信息;通过所述发布服务根据所述当前加载图集信息,从所述已部署的识别服务中确定目标识别服务,其中,所述目标识别服务对应的当前加载信息满足以下至少一项:当前已加载的图集数量最少;当前已加载的图集中的识别图数量最少。在一些实施例中,发布服务从数据库服务中获得至少一个识别服务中的每个识别服务当前已加载的图集信息,然后根据每个识别服务当前已加载的图集信息,从该至少一个识别服务中确定目标识别服务,其中,目标识别服务可以是当前已加载的图集数量最少的识别服务,也可以是当前已加载的图集中的识别图数量最少的识别服务。在一些实施例中,所述当前加载图集信息可以是与目标识别服务当前加载的图集相关的任何信息,如当前是否加载图集、当前加载的图集数量、当前加载的每个图集的标识信息、当前加载的每个图集中的识别图以及数量、当前加载的每个图集中的识别图对应的索引文件、索引文件地址等任一项信息。例如,识别服务包括M1、M2和M3,M1中已加载的图集数量为20,M2已加载的图集数量为32,M3已加载的图集数量为25,则 选择当前已加载的图集数量最少的M1作为目标图集对应的目标识别服务。又例如,识别服务包括N1、N2和N3,N1中已加载的识别图数量为450,N2已加载的识别图数量为312,N3已加载的识别图数量为256,则选择当前已加载的识别图数量最少的N3作为目标图集对应的目标识别服务。需要说明的是,上述目标识别服务满足的条件仅为举例,而非对本申请的限制,任何用于确定目标图集对应的目标识别服务的实现方式,均应包含在本申请的保护范围内。在一些实施例中,所述图像识别业务服务中的业务服务还包括图像识别管理服务,所述图像识别管理服务用于管理所述至少一个识别服务;其中,所述方法还包括:对于所述至少一个识别服务中的每个识别服务,在该识别服务启动时,根据所述图像识别管理服务的域名信息和/或地址信息,向所述图像识别管理服务发送注册信息;通过所述图像识别管理服务接收所述注册信息,根据所述注册信息生成该识别服务的相关信息,并将该识别服务的相关信息存储于所述图像识别服务对应的基础服务中的数据库服务。在一些实施例中,所述图像识别业务服务中的业务服务还包括图像识别管理服务,所述图像识别管理服务用于在数据库服务中生成识别服务的相关信息(例如,当前加载的识别图的ID、索引文件地址、图集、发布时间等当前加载图集信息),以记录当前每个已启动的识别服务的相关信息,而发布服务可从该数据库服务中获得至少一个识别服务中的每个识别服务当前已加载的图集信息,然后根据每个识别服务当前已加载的图集信息,从该至少一个识别服务中确定目标识别服务。
在一些实施例中,所述方法还包括:对于所述至少一个识别服务中的每个已启动的识别服务,通过该已启动的识别服务定时向所述图像识别管理服务发送心跳信息;若所述图像识别管理服务在预定时间间隔内未收到所述至少一个识别服务中的第七识别服务发送的心跳信息,则在所述至少一个识别服务中确定第八识别服务,从所述数据库服务获得所述第七识别服务对应的当前加载图集信息,以在所述第八识别服务中加载所述当前加载图集信息所对应的图集。本实施例中的相关操作已在前述实施例中予以详述,在此不再赘述。
在一些实施例中,所述方法还包括:对于所述图像发布服务请求,若所述图像发布服务请求对应的目标业务服务已部署在多个容器集上,通过所述容器管理平台根据所述多个容器集中每个容器集的负荷信息,从所述多个容器集中确定目标容器集,并通过所述目标容器集上部署的所述目标业务服务来处理所述图像发布服务请 求。
图4示出了根据本申请一个实施例的基于容器云上部署的图像识别服务的图像识别的方法流程图,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务服务中的业务服务包括以下至少一项:至少一个识别服务、特征提取服务、图像识别API服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;其中,该方法包括步骤S31、步骤S32、步骤S33、步骤S34和步骤S35。在步骤S31中,通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;在步骤S32中,通过所述图像识别API服务从所述图像识别服务对应的基础服务中的数据库服务获得所述至少一个识别服务中与所述用户图集相对应的目标识别服务,并根据所述特征提取服务的服务地址将所述待识别图片及所述目标识别服务提供给所述特征提取服务;在步骤S33中,通过所述特征提取服务获得所述待识别图片及所述目标识别服务,提取所述待识别图片的特征信息,并根据所述目标识别服务的服务地址将所述特征信息提供给所述目标识别服务;在步骤S34中,通过所述目标识别服务获得所述特征信息,将所述特征信息与所述目标识别服务当前已加载的索引文件进行匹配;在步骤S35中,若匹配成功,通过所述目标识别服务获得与所述特征信息相匹配的目标索引文件对应的目标识别图信息,并将所述目标识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述目标识别图信息,从所述基础服务获得所述目标识别图信息对应的目标AR素材,并将所述目标AR素材返回至所述目标应用。
在一些实施例中,目标应用发送待识别图片,识别API服务接收到该待识别图片后,获得该待识别图片对应的用户图集,例如,可以将目标应用对应的图集作为该待识别图片对应的用户图集,或者,可以将用户账号对应的图集作为该待识别图片对应的用户图集,或者,还可以根据目标应用发送的指定图集信息作为该待识别图片对应的用户图集。在一些实施例中,图像识别API服务启动时会根据部署文件 中的配置服务地址,从配置服务加载图像识别API服务对应的配置文件,该配置文件中包括图像识别API服务所依赖的特征提取服务的服务地址。在一些实施例中,图像识别API服务从数据库服务中查询到该用户图集对应的目标识别服务(如目标识别服务的地址、名称等)。更进一步地,所述图像识别业务服务中的业务服务还包括发布服务,图像识别API服务调用发布服务,发布服务从数据库服务中查询到该用户图集对应的目标识别服务(如目标识别服务的地址、名称等),并将目标识别服务返回给图像识别API服务。在另一些实施例中,所述图像识别业务服务中的业务服务还包括图像识别管理服务,所述图像识别管理服务用于在数据库服务中生成识别服务的相关信息(例如,当前加载的识别图的ID、索引文件地址、图集、发布时间等当前加载图集信息),以记录当前每个已启动的识别服务的相关信息,而图像识别API服务可从该数据库服务中获得图集对应的目标识别服务,然后将该目标识别服务返回给图像识别API服务。图像识别API服务根据配置文件中的特征提取服务的服务地址,将该待识别图片及对应的目标识别服务(如目标识别服务的地址、名称等)发送给特征提取服务,特征提取服务提取该待识别图片对应的特征信息后,根据目标识别服务的服务地址,将该特征信息提供给目标识别服务,目标识别服务将该特征信息与目标识别服务当前已加载的一个或多个索引文件进行匹配,若匹配成功,获得与该特征信息相匹配的目标索引文件对应的目标识别图信息(例如,识别图ID、识别图名称等),并将该目标识别图信息返回给图像识别API服务,图像识别API服务根据返回的目标识别图信息在基础服务中查询得到目标识别图信息所绑定的AR素材,图像识别API服务将所述AR素材返回至所述目标应用。其中,所述图像识别API服务将所述AR素材返回至所述目标应用,在一些实施例中,图像识别API服务可以从基础服务中的文件存储服务中获取所述AR素材并直接将AR素材返回给目标应用,或者,图像识别API服务还可以从数据库服务中得到所述AR素材对应的存储地址并将AR素材对应的下载地址返回给目标应用,由目标应用来下载对应的AR素材,这里不进行限定;在一些实施例中,若匹配失败,目标识别服务或图像识别API服务生成用于指示待识别图片识别失败的图像识别服务响应信息,并将图像识别服务响应信息返回给目标应用,以提示用户识别失败。在一些实施例中,所述图像识别业务服务中的业务服务还包括账户服务,账户服务用于提供与账号管理相关的服务,如管理用户、企业相关信息等。
在一些实施例中,所述通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集,包括:通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,对所述目标应用进行接入权限认证;若认证通过,获得所述待识别图片对应的用户图集。在一些实施例中,目标应用将待识别图片发送到识别API服务,图像识别API服务会先对目标应用或用户身份进行接入权限认证,只有在认证通过后,才可以获得该待识别图片所对应的用户图集,并进行待识别图片的识别。在一些实施例中,所述方法还包括:对于所述图像识别服务请求,若所述图像识别服务请求对应的目标业务服务已部署在多个容器集上,通过所述容器管理平台根据所述多个容器集中每个容器集的负荷信息,从所述多个容器集中确定目标容器集,并通过所述目标容器集上部署的所述目标业务服务来处理所述图像识别服务请求。
在一些实施例中,所述图像识别业务服务中的业务服务还包括以下至少一项:前端资源服务、索引服务、内容管理服务、资源存储服务,其中,所述前端资源服务用于接收用户针对目标识别图执行的相关操作信息;所述内容管理服务响应于用户针对目标识别图执行的相关操作信息,并以此在数据库服务中更新该目标识别图的相关信息;所述索引服务用户生成目标识别图的索引文件;所述资源存储服务用于提供文件存储的中间服务,封装标准的存储接口给到其他服务,后面可对接多种文件存储服务。
在一些实施例中,所述图像识别业务服务中的业务服务还包括图像识别管理服务,所述图像识别管理服务用于管理所述至少一个识别服务;其中,所述方法还包括:对于所述至少一个识别服务中的每个识别服务,在该识别服务启动时,根据所述图像识别管理服务的域名信息和/或地址信息,向所述图像识别管理服务发送注册信息;通过所述图像识别管理服务接收所述注册信息,根据所述注册信息生成该识别服务的相关信息,并将该识别服务的相关信息存储于所述图像识别服务对应的基础服务中的数据库服务。本实施例中的相关操作已在前述实施例中予以详述,在此不再赘述。
在一些实施例中,所述方法还包括:对于所述至少一个识别服务中的每个已启动的识别服务,通过该已启动的识别服务定时向所述图像识别管理服务发送心跳信息;若所述图像识别管理服务在预定时间间隔内未收到所述至少一个识别服务中的 第九识别服务发送的心跳信息,则在所述至少一个识别服务中确定第十识别服务,从所述数据库服务获得所述第九识别服务对应的当前加载图集信息,以在所述第十识别服务中加载所述当前加载图集信息所对应的图集。本实施例中的相关操作已在前述实施例中予以详述,在此不再赘述。
图5示出了根据本申请一个实施例的在容器云上部署图像识别服务的网络设备结构图,该设备包括一一模块11和一二模块12。一一模块11,用于在部署完成图像识别服务中的基础服务后,获取所述图像识别服务中图像识别业务服务对应的部署文件,其中,所述部署文件中包含所述图像识别业务服务中每个业务服务对应的服务名称、镜像文件地址、容器集数量、配置服务地址,所述图像识别业务服务中的业务服务包括以下至少一项:图像识别管理服务、前端资源服务、索引服务、至少一个识别服务、特征提取服务、账号服务、内容管理服务、发布服务、图像识别API服务、资源存储服务;一二模块12,用于对于所述图像识别业务服务中每个业务服务,根据所述部署文件在容器云上创建容器集并启动该业务服务,通过所述容器集根据该业务服务对应的配置服务地址加载对应的配置文件,并通过容器管理平台对该业务服务进行管理,其中,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;其中,通过所述容器云部署的所述图像识别业务服务执行以下至少任一项:通过所述发布服务接收针对第一识别图的图像发布服务请求,获得所述第一识别图,并将所述第一识别图提供给所述索引服务;通过所述索引服务获得所述第一识别图,生成所述第一识别图对应的第一索引文件,并将所述第一索引文件对应的第一存储地址返回所述发布服务;通过所述发布服务获得所述第一存储地址,将所述第一存储地址提供给所述至少一个识别服务中与所述第一识别图对应的第一图集相对应的第一识别服务;通过所述第一识别服务获得所述第一存储地址,根据所述第一存储地址,加载所述第一索引文件;或者,通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;通过所述图像识别API服务从所述基础服务中的数据库服务获得所述至少一个识别服务中所述用户图集对应的第二识别服务,将所述待识别图片及所述第二识别服务提供给所述特征提取服务;通过所述特征提取服务获得所述待识别图片及所述第二识别服务,提取所述待识别图片的特征信 息,并将所述特征信息提供给所述第二识别服务;通过所述第二识别服务获得所述特征信息,将所述特征信息与所述第二识别服务当前已加载的索引文件进行匹配;若匹配成功,通过所述第二识别服务获得与所述特征信息相匹配的第二索引文件对应的第二识别图信息,并将所述第二识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述第二识别图信息,从所述基础服务获得所述第二识别图信息对应的第二AR素材,并将所述第二AR素材返回至所述目标应用。
在一些实施例中,容器化技术(docker)用于支持创建和使用Linux容器,docker利用Linux核心中的资源分离机制,例如cgroups,以及Linux核心名字空间(namespaces),来创建独立的容器(containers)。容器化是软件开发的一种方法,通过该方法可将应用程序或服务、其依赖项及其配置(抽象化为部署清单文件)一起打包为容器映像,软件容器充当软件部署的标准单元。
在一些实施例中,容器管理平台(包括但不限于Kubernetes(K8s)、Swam、Meso等,其中,Kubernetes提供了一个可弹性运行分布式系统的框架,上下文中以Kubernetes为例来对容器管理平台进行说明),用于部署、扩展和管理容器化(containerized)应用程序,因此可以将运行Linux容器的多组主机聚集在一起,由Kubernetes高效地管理这些集群,而且,这些集群可跨公共云、私有云或混合云部署主机。
在一些实施例中,Kubernetes是由一组节点组成,这些节点可以是物理主机,也可以是虚拟机。Kubernetes平台运行这些节点之上,构成了集群。Kubernetes集群包括Master Node(主机节点)和用于实际部署的Pod的工作Node(节点)。一个集群往往由多个Master Node,这几个Master Node控制着整个集群的所有Node,所有任务分配都来自于Master Node。Master Node控制整个集群,做出关于群集的全局决策(例如调度),以及检测和响应群集事件。Node是K8s集群中真正的工作负载节点,K8s集群由多个Node共同承担工作负载,支持动态在集群中添加或删除Node。Pod(容器集)被分配到某个具体的Node上执行,且包含一个或多个容器的容器组。同一容器集中的所有容器共享同一个IP地址、IPC、主机名称及其它资源。容器从属于Pod,在运行应用、库及其依赖的微服务中,容器是最低层级的,通过绑定一个外部IP,容器可以被外网访问。
在一些实施例中,Kubernetes主节点(Master Node)从外部接受指令,再把指 令转交给附属的Node(节点),这种带有大量服务的切换工作自动决定最适合该任务的节点,然后在该节点上分配资源并指派Pod(容器集)来完成任务请求。在一些实施例中,图像识别服务中的各个业务服务封装在docker镜像中,在Kubernetes中的各个Pod中运行。
在一些实施例中,容器云平台是在云端把容器技术和容器管理平台结合起来,提供构建、发布和运行分布式应用的平台,以下简称容器云。在一些实施例中,容器云运行在多组服务器(例如,x64服务器、x86服务器)之上,在容器云上部署图像识别服务中的多个业务服务,并通过Kubernetes来对容器云上部署的图像识别服务中的这些业务服务进行管理,可以解决大规模图像识别服务快速扩容的技术问题,实现图像识别服务的负载均衡和动态扩充,解决不同系统和不同硬件环境部署的差异问题,提升服务的可移植性和安全性,降低部署难度,增加部署灵活性,加速相关产品上线速度。
在一些实施例中,所述图像识别服务中的基础服务包括以下至少一项:数据库、缓存数据库、文件存储、配置、镜像仓库、配置编辑器等相关的基础类服务,所述基础服务可以部署在容器云上,也可以部署在容器云的外围(如外部的实体云服务器上),优选地,所述基础服务部署在容器云的外围。
在一些实施例中,在部署完成图像识别服务中的基础服务后,k8s获取图像识别服务中的图像识别业务服务对应的部署文件,部署文件是启动图像识别业务服务的基础文件,里面指定了k8s所需要的基础内容,如在部署文件中指定图像识别业务服务中的每个业务服务的服务名称、镜像文件地址、容器集数量、容器集运行时的环境变量(如配置服务的地址等),进一步地,环境变量中还可以指定配置项key,更进一步地,部署文件中还可以指定每个业务服务的service(SVC)的内容(包括对外暴露的端口等内容)等,k8s根据部署文件创建容器集并在容器集上启动图像识别业务服务中的每个业务服务,图像识别业务服务包括以下至少一项:图像识别管理服务、前端资源服务、索引服务、识别服务、特征提取服务、账号服务、内容管理服务、发布服务、图像识别API服务、资源存储服务,其中,部署文件可以为一个或多个,在此不进行限定。在一些实施例中,每个业务服务对应同一个配置服务地址,在另一些实施例中,每个业务服务对应不同的配置服务地址,在此不进行限定。在此并不对不同业务服务之间的部署先后顺序作任何的限定。在一些实施例 中,所述图像识别管理服务用于执行服务控制,如控制识别服务器的分配等。所述前端资源服务是用于管理后台或web网页前端,同时是对应客户端计入的入口服务。在一些实施例中,按照业务逻辑进行划分,图像识别业务服务包括依赖于所述基础服务的第二层服务、依赖于所述第二层服务的第一层服务,其中,所述第二层服务用于提供偏向于底层算法功能类型的服务(如索引服务、识别服务、特征提取服务等至少一项服务),与具体的相关的业务逻辑关联性小,所述第一层服务用于提供偏向于上层业务逻辑类型的服务(如账号服务、内容管理服务、发布服务、图像识别API服务等至少一项服务),与具体的业务逻辑关联性大,其中,需要注意的是,所述第一层服务和第二层服务是根据业务逻辑进行划分的,并不表示部署上存在层级划分,仅用于方便理解业务逻辑。依赖是指依赖方直接或间接使用或调用或更新被依赖方的数据、功能、接口等,例如第一层服务中的发布服务需要调用第二层服务中的索引服务;又例如,第一层服务中的内容管理服务更新基础服务中的数据库内容等。图2为本申请一个示例的服务架构图,其中,所有业务服务和配置编辑器存放在镜像仓库中,在容器云创建服务之后配置镜像地址,服务启动之后从配置服务(etcd)获取对应的配置,初始化mysql数据库表和数据,完成服务架构的搭建;其中,集群服务入口为前端资源服务(webhiar),服务请求转发到账号服务(accountsrv)、内容管理服务(contentsrv)、发布服务(publishsrv)、图像识别API服务(recognizesrv)等第一层服务,第一层依赖索引服务(包括云索引服务(cloudkey)、本地索引服务(localkey))、识别服务(searchsrv)、特征提取服务(featuresrv)等第二层服务,第二层服务依赖数据库服务mysql、文件存储服务fastdfs、资源存储服务(storagesrv)等基础服务。其中,webhiar作为访问入口,用于部署管理后台或web网页前端的API的入口服务,应用的访问及应用端的API请求都由此节点为入口,当出现并发的访问时,可以在该部署的服务器之前搭建负载均衡的后面,根据不同的请求的压力,架构中不同的服务可以进行节点的扩充。需要说明的是,上述所涉及的各项服务将在后续实施例中予以详述。在一些实施例中,通过将图像识别服务部署在容器云上,可以提升图像识别服务的可移植性和安全性。
在一些实施例中,对于所述图像识别业务服务中每个业务服务,根据部署文件中的每个业务服务对应的服务名称、镜像文件地址、容器集数量等部署信息,在容器云上创建容器集并启动该业务服务,所述容器集根据部署文件中的配置服务地 址,从配置服务中加载该业务服务对应的配置文件(例如,配置服务中包括多个不同的业务服务分别对应的配置文件,可以通过该业务服务的服务名称在配置服务中找到该业务服务对应的配置文件并加载),以完成该业务服务的启动,并通过容器管理平台(例如,k8s)对容器云上已部署的图像识别业务服务中的至少一个服务进行管理。在一些实施例中,业务服务启动时需要加载配置文件,配置文件里面为业务服务运行时需要的内容,通常包含业务服务占用的端口号、连接的数据库地址、缓存服务器的地址、依赖(需要调用)的其他业务服务的服务地址。在一些实施例中,K8S根据部署文件中业务服务对应的容器集数量,在容器云上创建该业务服务对应的、所述容器集数量的容器集,根据部署文件中该业务服务对应的镜像文件地址,下载该业务服务对应的镜像文件,并根据该镜像文件在所述容器集上开始启动该业务服务,然后根据部署文件设置环境变量,所述容器集读取环境变量中设置的配置服务的地址,从配置服务中加载该业务服务对应的配置文件,并根据配置文件的内容完成该业务服务的启动,然后该业务服务可以处理业务请求。
在一些实施例中,若基础服务部署在容器云上,则可以通过容器管理平台对部署在容器云上的基础服务和图像识别业务服务中的至少一个服务进行管理。在另一些实施例中,若基础服务部署在容器云的外围服务上,则可以通过容器管理平台对部署在容器云上的图像识别业务服务中的至少一个服务进行管理。在一些实施例中,k8s主节点(Master Node)从外部接受指令,再把指令转交给附属的Node(节点),然后在该节点上分配资源并指派Pod(容器集)来完成任务请求。各个服务封装在docker镜像中,在k8s中的各个Pod中运行。在一些实施例中,通过k8s来对容器云上部署的图像识别服务进行管理,可以解决大规模图像识别服务快速扩容的技术问题,实现图像识别服务的负载均衡和动态扩充,降低部署难度,增加部署灵活性,加速相关产品上线速度。
在一些实施例中,配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务。例如,发布服务依赖于索引服务及其他业务服务,发布服务需要调用索引服务及其他业务服务,则发布服务对应的配置文件中包含索引服务的服务名称与索引服务地址之间的映射关系以及其他业务服务的服务名称与其他业务服务地址之间的映射关系,当发布服务需要调用索引服务时,可以通过配置文 件中的索引服务的服务名称与服务地址之间的映射关系,来获取索引服务的服务地址,从而发布服务可以根据索引服务的服务地址来调用索引服务。
在一些实施例中,所述第二层服务包括以下至少一项:
1)索引服务
2)识别服务
3)特征提取服务
在此,相关第二层服务与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述第一层服务包括以下至少一项:
1)内容管理服务
2)发布服务
3)图像识别API服务
4)账号服务
在此,相关第一层服务与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述基础服务包括以下至少一项:
1)配置服务
2)数据库服务
3)文件存储服务
4)缓存数据库服务
5)镜像仓库服务
6)配置编辑器服务
在此,相关基础服务与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述设备还用于:在所述容器云上部署资源存储服务(storagesrv)。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述对于所述图像识别业务服务中每个业务服务,根据所述部署文件在容器云上创建容器集并启动该业务服务,包括:对于所述图像识别业务 服务中每个业务服务,根据所述部署文件中该业务服务对应的容器集数量,在容器云上创建该业务服务对应的、所述容器集数量的容器集,根据所述部署文件中该业务服务对应的镜像文件地址,下载该业务服务对应的镜像文件,并根据该镜像文件在所述容器集上启动该业务服务。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述图像识别管理服务用于管理所述至少一个识别服务;其中,所述设备还用于:对于所述至少一个识别服务中的每个识别服务,在该识别服务启动时,根据所述图像识别管理服务的域名信息和/或地址信息,向所述图像识别管理服务发送注册信息;通过所述图像识别管理服务接收所述注册信息,根据所述注册信息生成该识别服务的相关信息,并将该识别服务的相关信息存储于所述基础服务中的数据库服务。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述设备还用于:对于所述至少一个识别服务中的每个已启动的识别服务,通过该已启动的识别服务定时向所述图像识别管理服务发送心跳信息;若所述图像识别管理服务在预定时间间隔内未收到所述至少一个识别服务中的第三识别服务发送的心跳信息,则在所述至少一个识别服务中确定第四识别服务,从所述基础服务中的数据库服务获得所述第三识别服务对应的当前加载图集信息,以在所述第四识别服务中加载所述当前加载图集信息所对应的图集。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述在所述至少一个识别服务中确定第四识别服务,包括:若所述图像识别管理服务接收到所述至少一个识别服务中的新启动的第五识别服务发送的注册信息,通过所述图像识别管理服务将所述第五识别服务确定为所述第四识别服务。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述在所述至少一个识别服务中确定第四识别服务,包括:通过所述图像识别管理服务从所述数据库服务获取所述至少一个识别服务中的每个已启动的识别服务的当前加载图集信息;通过所述图像识别管理服务根据所述每个已启动的识别服务的当前加载图集信息,确定第四识别服务,其中,所述第四识别服务满足以下至少一项:当前未加载任何图集;当前已加载的图集数量最少;当 前已加载的图集中识别图像数量最少。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例,所述设备还用于:对于待处理图像服务请求,若所述待处理图像服务请求对应的目标业务服务已部署在多个容器集上,通过所述容器管理平台根据所述多个容器集中每个容器集的负荷信息,从所述多个容器集中确定目标容器集,并通过所述目标容器集上部署的所述目标业务服务来处理所述待处理图像服务请求。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述设备还用于:通过所述容器管理平台监控已创建的一个或多个容器集的运行状态信息,若监控到目标容器集的负荷信息满足预定扩容条件,创建一个或多个第二目标容器集,并在所述一个或多个第二目标容器集上部署所述目标容器集对应的业务服务。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述设备还用于:响应于针对目标容器集的扩容指令,通过所述容器管理平台创建一个或多个第二目标容器集,并在所述一个或多个第二目标容器集上部署所述目标容器集对应的业务服务。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述设备还用于:若所述容器管理平台确定目标用户图集满足预定的并发加载条件,确定所述目标用户图集对应的一个或多个并发识别服务;通过所述一个或多个并发识别服务中每个并发识别服务分别加载所述目标用户图。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中所述确定所述目标用户图集对应的一个或多个并发识别服务,包括:从所述至少一个识别服务中已部署的识别服务中确定所述目标用户图集对应的一个或多个并发识别服务。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述确定所述目标用户图集对应的一个或多个并发识别服务,包括:创建一个或多个第二目标容器集,在所述一个或多个第二目标容器集中每个第二目标容器集上分别部署一个或多个第六识别服务,并将所述一个或多个第 六识别服务作为所述目标用户图集对应的一个或多个并发识别服务。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述设备还用于:若所述容器管理平台确定目标用户图集满足预定的划分条件,将所述目标用户图集划分为互不相交的多个子集,其中,所述多个子集中的每个子集包括至少一个识别图;确定所述目标用户图集对应的一个或多个识别服务;通过所述一个或多个识别服务中的每个识别服务分别加载所述多个子集中的一个子集,其中,不同识别服务对应不同子集。在此,相关操作与图1所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
图6示出了根据本申请一个实施例的基于容器云上部署的图像识别服务的图像发布的网络设备结构图,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务服务中的业务服务包括以下至少一项:前端资源服务、索引服务、至少一个识别服务、内容管理服务、发布服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;其中,该设备包括二一模块21、二二模块22、二三模块23和二四模块24。二一模块21,用于通过所述发布服务接收针对目标识别图的图像发布服务请求,获得所述目标识别图,并根据所述索引服务的服务地址将所述目标识别图提供给所述索引服务;二二模块22,用于通过所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件对应的目标存储地址返回所述发布服务;二三模块23,用于通过所述发布服务获得所述目标存储地址,将所述目标存储地址提供给所述至少一个识别服务中与所述目标识别图对应的目标图集相对应的目标识别服务;二四模块24,用于通过所述目标识别服务获得所述目标存储地址,根据所述目标存储地址,加载所述目标索引文件。
在一些实施例中,上下文中的“发布”是指将目标识别图添加到识别服务器或将目标识别图对应的索引文件加载到识别服务器,以提供检索。例如,用户在前端资源服务界面中上传目标识别图,并针对目标识别图执行一系列操作,如将目标识别图加入某个现有图集或新建图集并将目标识别图放入该新建图集,又如将目标识 别图与某个AR素材进行绑定,内容管理服务响应于用户针对目标识别图执行的相关操作信息,获得目标识别图及目标识别图对应的图集信息,在一些实施例中,还可以获得目标识别图所绑定的AR素材,并以此在数据库服务中更新该目标识别图的相关信息,其中,所述相关信息包括以下任一项:目标识别图的标识信息、目标识别图的存储地址、目标识别图对应的图集的标识信息、目标识别图所绑定的AR素材的标识信息、目标识别图所绑定的AR素材的存储地址等,生成针对目标识别图的图像发布服务请求并发送给发布服务,在一些实施例中,该图像发布服务请求包括目标识别图,其中,所述目标识别图可以是目标识别图本身,也可以是目标识别图的标识信息,如名称,ID等,或者,该图像发布服务请求除包括目标识别图外,还可以包括目标识别图对应的图集的信息(例如,图集的标识等)。在一些实施例中,发布服务启动时会根据配置文件中的配置服务地址,从配置服务加载发布服务对应的配置文件,该配置文件中包括发布服务所依赖的索引服务的服务地址,发布服务接收到针对目标识别图的图像发布服务请求后,获得该图像发布服务请求对应的目标识别图(可以是目标识别图本身,或目标识别图的标识信息,如名称,ID等),并根据配置文件中的索引服务的服务地址,将目标识别图或物料图片的标识信息提供给索引服务,本地索引服务或云索引服务生成目标识别图对应的索引文件(本地索引服务用于生成本地识别的索引文件,云索引服务用于生成云端识别的索引文件,两个索引服务对应的特征提取算法可以相同或者不同),生成后的索引文件会存储到文件存储服务,并将索引文件对应的索引文件存储地址返回给发布服务,发布服务将存储地址提供给目标识别图所对应的图集所对应的识别服务,由识别服务根据索引文件存储地址从文件存储服务加载对应的索引文件到内存,以提供目标识别图的识别服务。在一些实施例中,识别服务加载索引文件后,更新数据库服务中该目标识别图对应的相关信息,例如更新目标识别图的发布状态,更新目标识别图对应的图集所对应的识别服务器信息等。其中,发布服务获取目标识别图对应的图集信息可以通过图像发布服务请求所包含的信息中获取物料图片对应的图集的信息,还可以通过发布服务到数据库服务中获取目标识别图对应的图集的信息,在此不做限定。在一些实施例中,所述图像识别业务服务中的业务服务还包括账户服务,账户服务用于提供与账号管理相关的服务,如管理用户、企业相关信息等。
在一些实施例中,所述设备还用于:通过所述前端资源服务接收用户针对目标 识别图的操作信息,将所述操作信息转发到内容管理服务;通过所述内容管理服务根据所述操作信息,获得所述目标识别图及所述目标识别图对应的目标图集,更新所述图像识别服务对应的基础服务中的数据库服务中的所述目标识别图的相关信息,生成针对所述目标识别图的图像发布服务请求并发送至所述发布服务。在此,相关操作与图3所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件对应的目标存储地址返回所述发布服务,包括:通过所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件提供给所述基础服务中的文件存储服务;通过所述文件存储服务获得所述目标索引文件,存储并获得所述目标索引文件对应的目标存储地址,并将所述目标存储地址返回所述索引服务;通过所述索引服务获得所述目标存储地址,并将所述目标存储地址返回所述发布服务。在此,相关操作与图3所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,通过所述发布服务将所述目标存储地址提供给所述至少一个识别服务中与所述目标识别图对应的目标图集相对应的目标识别服务,包括:通过所述发布服务从所述图像识别服务对应的基础服务中的数据库服务获得所述目标图集对应的发布状态指示信息;若所述发布状态指示信息指示所述目标图集已发布,通过所述发布服务从所述数据库服务获得所述至少一个识别服务中所述目标图集对应的目标识别服务,并根据所述目标识别服务的服务地址将所述目标存储地址提供给所述目标图集对应的目标识别服务;若所述发布状态信息指示所述目标图集未发布,通过所述发布服务从所述至少一个识别服务中已部署的识别服务中确定目标识别服务,并根据所述目标识别服务的服务地址将所述目标存储地址提供给所述目标识别服务。在此,相关操作与图3所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述通过所述发布服务从所述至少一个识别服务中已部署的识别服务中确定目标识别服务,包括:通过所述发布服务从所述数据库服务获得所述至少一个识别服务中已部署的识别服务对应的当前加载图集信息;通过所述发布服务根据所述当前加载图集信息,从所述已部署的识别服务中确定目标识别服务,其中,所述目标识别服务对应的当前加载信息满足以下至少一项:当前已加载的图 集数量最少;当前已加载的图集中的识别图数量最少。在此,相关操作与图3所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述图像识别业务服务中的业务服务还包括图像识别管理服务,所述图像识别管理服务用于管理所述至少一个识别服务;其中,所述设备还用于:对于所述至少一个识别服务中的每个识别服务,在该识别服务启动时,根据所述图像识别管理服务的域名信息和/或地址信息,向所述图像识别管理服务发送注册信息;通过所述图像识别管理服务接收所述注册信息,根据所述注册信息生成该识别服务的相关信息,并将该识别服务的相关信息存储于所述图像识别服务对应的基础服务中的数据库服务。在此,相关操作与图3所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述设备还用于:对于所述至少一个识别服务中的每个已启动的识别服务,通过该已启动的识别服务定时向所述图像识别管理服务发送心跳信息;若所述图像识别管理服务在预定时间间隔内未收到所述至少一个识别服务中的第七识别服务发送的心跳信息,则在所述至少一个识别服务中确定第八识别服务,从所述数据库服务获得所述第七识别服务对应的当前加载图集信息,以在所述第八识别服务中加载所述当前加载图集信息所对应的图集。在此,相关操作与图3所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述设备还用于:对于所述图像发布服务请求,若所述图像发布服务请求对应的目标业务服务已部署在多个容器集上,通过所述容器管理平台根据所述多个容器集中每个容器集的负荷信息,从所述多个容器集中确定目标容器集,并通过所述目标容器集上部署的所述目标业务服务来处理所述图像发布服务请求。在此,相关操作与图3所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
图7示出了根据本申请一个实施例的基于容器云上部署的图像识别服务的图像识别的网络设备结构图,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务服务中的业务服务包括以下至少一项:至少一个识别服务、特征提取服务、图像识别API服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文 件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;其中,该设备包括三一模块31、三二模块32、三三模块33、三四模块34和三五模块35。三一模块31,用于通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;三二模块32,用于通过所述图像识别API服务从所述图像识别服务对应的基础服务中的数据库服务获得所述至少一个识别服务中与所述用户图集相对应的目标识别服务,并根据所述特征提取服务的服务地址将所述待识别图片及所述目标识别服务提供给所述特征提取服务;三三模块33,用于通过所述特征提取服务获得所述待识别图片及所述目标识别服务,提取所述待识别图片的特征信息,并根据所述目标识别服务的服务地址将所述特征信息提供给所述目标识别服务;三四模块34,用于通过所述目标识别服务获得所述特征信息,将所述特征信息与所述目标识别服务当前已加载的索引文件进行匹配;三五模块35,用于若匹配成功,通过所述目标识别服务获得与所述特征信息相匹配的目标索引文件对应的目标识别图信息,并将所述目标识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述目标识别图信息,从所述基础服务获得所述目标识别图信息对应的目标AR素材,并将所述目标AR素材返回至所述目标应用。
在一些实施例中,目标应用发送待识别图片,识别API服务接收到该待识别图片后,获得该待识别图片对应的用户图集,例如,可以将目标应用对应的图集作为该待识别图片对应的用户图集,或者,可以将用户账号对应的图集作为该待识别图片对应的用户图集,或者,还可以根据目标应用发送的指定图集信息作为该待识别图片对应的用户图集。在一些实施例中,图像识别API服务启动时会根据配置文件中的配置服务地址,从配置服务加载图像识别API服务对应的配置文件,该配置文件中包括图像识别API服务所依赖的特征提取服务的服务地址。在一些实施例中,图像识别API服务从数据库服务中查询到该用户图集对应的目标识别服务(如目标识别服务的地址、名称等)。更进一步地,所述图像识别业务服务中的业务服务还包括发布服务,图像识别API服务调用发布服务,发布服务从数据库服务中查询到该用户图集对应的目标识别服务(如目标识别服务的地址、名称等),并将目标识别服务返回给图像识别API服务。在另一些实施例中,所述图像识别业务服务中的 业务服务还包括图像识别管理服务,所述图像识别管理服务用于在数据库服务中生成识别服务的相关信息(例如,当前加载的识别图的ID、索引文件地址、图集、发布时间等当前加载图集信息),以记录当前每个已启动的识别服务的相关信息,而图像识别API服务可从该数据库服务中获得图集对应的目标识别服务,然后将该目标识别服务返回给图像识别API服务。图像识别API服务根据配置文件中的特征提取服务的服务地址,将该待识别图片及对应的目标识别服务(如目标识别服务的地址、名称等)发送给特征提取服务,特征提取服务提取该待识别图片对应的特征信息后,根据目标识别服务的服务地址,将该特征信息提供给目标识别服务,目标识别服务将该特征信息与目标识别服务当前已加载的一个或多个索引文件进行匹配,若匹配成功,获得与该特征信息相匹配的目标索引文件对应的目标识别图信息(例如,识别图ID、识别图名称等),并将该目标识别图信息返回给图像识别API服务,图像识别API服务根据返回的目标识别图信息在基础服务中查询得到目标识别图信息所绑定的AR素材,图像识别API服务将所述AR素材返回至所述目标应用。其中,所述图像识别API服务将所述AR素材返回至所述目标应用,在一些实施例中,图像识别API服务可以从基础服务中的文件存储服务中获取所述AR素材并直接将AR素材返回给目标应用,或者,图像识别API服务还可以从数据库服务中得到所述AR素材对应的存储地址并将AR素材对应的下载地址返回给目标应用,由目标应用来下载对应的AR素材,这里不进行限定;在一些实施例中,若匹配失败,目标识别服务或图像识别API服务生成用于指示待识别图片识别失败的图像识别服务响应信息,并将图像识别服务响应信息返回给目标应用,以提示用户识别失败。在一些实施例中,所述图像识别业务服务中的业务服务还包括账户服务,账户服务用于提供与账号管理相关的服务,如管理用户、企业相关信息等。
在一些实施例中,所述通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集,包括:通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,对所述目标应用进行接入权限认证;若认证通过,获得所述待识别图片对应的用户图集。在此,相关操作与图4所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述设备还用于:对于所述图像识别服务请求,若所述图像 识别服务请求对应的目标业务服务已部署在多个容器集上,通过所述容器管理平台根据所述多个容器集中每个容器集的负荷信息,从所述多个容器集中确定目标容器集,并通过所述目标容器集上部署的所述目标业务服务来处理所述图像识别服务请求。在此,相关操作与图4所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述图像识别业务服务中的业务服务还包括以下至少一项:前端资源服务、索引服务、内容管理服务、资源存储服务,其中,所述前端资源服务用于接收用户针对目标识别图执行的相关操作信息;所述内容管理服务响应于用户针对目标识别图执行的相关操作信息,并以此在数据库服务中更新该目标识别图的相关信息;所述索引服务用户生成目标识别图的索引文件;所述资源存储服务用于提供文件存储的中间服务,封装标准的存储接口给到其他服务,后面可对接多种文件存储服务。
在一些实施例中,所述图像识别业务服务中的业务服务还包括图像识别管理服务,所述图像识别管理服务用于管理所述至少一个识别服务;其中,所述设备还用于:对于所述至少一个识别服务中的每个识别服务,在该识别服务启动时,根据所述图像识别管理服务的域名信息和/或地址信息,向所述图像识别管理服务发送注册信息;通过所述图像识别管理服务接收所述注册信息,根据所述注册信息生成该识别服务的相关信息,并将该识别服务的相关信息存储于所述图像识别服务对应的基础服务中的数据库服务。在此,相关操作与图4所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
在一些实施例中,所述设备还用于:对于所述至少一个识别服务中的每个已启动的识别服务,通过该已启动的识别服务定时向所述图像识别管理服务发送心跳信息;若所述图像识别管理服务在预定时间间隔内未收到所述至少一个识别服务中的第九识别服务发送的心跳信息,则在所述至少一个识别服务中确定第十识别服务,从所述数据库服务获得所述第九识别服务对应的当前加载图集信息,以在所述第十识别服务中加载所述当前加载图集信息所对应的图集。在此,相关操作与图4所示实施例相同或相近,故不再赘述,在此以引用方式包含于此。
图8示出了可被用于实施本申请中所述的各个实施例的示例性系统。
如图8所示在一些实施例中,系统300能够作为各所述实施例中的任意一个设 备。在一些实施例中,系统300可包括具有指令的一个或多个计算机可读介质(例如,系统存储器或NVM/存储设备320)以及与该一个或多个计算机可读介质耦合并被配置为执行指令以实现模块从而执行本申请中所述的动作的一个或多个处理器(例如,(一个或多个)处理器305)。
对于一个实施例,系统控制模块310可包括任意适当的接口控制器,以向(一个或多个)处理器305中的至少一个和/或与系统控制模块310通信的任意适当的设备或组件提供任意适当的接口。
系统控制模块310可包括存储器控制器模块330,以向系统存储器315提供接口。存储器控制器模块330可以是硬件模块、软件模块和/或固件模块。
系统存储器315可被用于例如为系统300加载和存储数据和/或指令。对于一个实施例,系统存储器315可包括任意适当的易失性存储器,例如,适当的DRAM。在一些实施例中,系统存储器315可包括双倍数据速率类型四同步动态随机存取存储器(DDR4SDRAM)。
对于一个实施例,系统控制模块310可包括一个或多个输入/输出(I/O)控制器,以向NVM/存储设备320及(一个或多个)通信接口325提供接口。
例如,NVM/存储设备320可被用于存储数据和/或指令。NVM/存储设备320可包括任意适当的非易失性存储器(例如,闪存)和/或可包括任意适当的(一个或多个)非易失性存储设备(例如,一个或多个硬盘驱动器(HDD)、一个或多个光盘(CD)驱动器和/或一个或多个数字通用光盘(DVD)驱动器)。
NVM/存储设备320可包括在物理上作为系统300被安装在其上的设备的一部分的存储资源,或者其可被该设备访问而不必作为该设备的一部分。例如,NVM/存储设备320可通过网络经由(一个或多个)通信接口325进行访问。
(一个或多个)通信接口325可为系统300提供接口以通过一个或多个网络和/或与任意其他适当的设备通信。系统300可根据一个或多个无线网络标准和/或协议中的任意标准和/或协议来与无线网络的一个或多个组件进行无线通信。
对于一个实施例,(一个或多个)处理器305中的至少一个可与系统控制模块310的一个或多个控制器(例如,存储器控制器模块330)的逻辑封装在一起。对于一个实施例,(一个或多个)处理器305中的至少一个可与系统控制模块310的一个或多个控制器的逻辑封装在一起以形成系统级封装(SiP)。对于一个实施例,(一个或多个) 处理器305中的至少一个可与系统控制模块310的一个或多个控制器的逻辑集成在同一模具上。对于一个实施例,(一个或多个)处理器305中的至少一个可与系统控制模块310的一个或多个控制器的逻辑集成在同一模具上以形成片上系统(SoC)。
在各个实施例中,系统300可以但不限于是:服务器、工作站、台式计算设备或移动计算设备(例如,膝上型计算设备、持有计算设备、平板电脑、上网本等)。在各个实施例中,系统300可具有更多或更少的组件和/或不同的架构。例如,在一些实施例中,系统300包括一个或多个摄像机、键盘、液晶显示器(LCD)屏幕(包括触屏显示器)、非易失性存储器端口、多个天线、图形芯片、专用集成电路(ASIC)和扬声器。
本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机代码,当所述计算机代码被执行时,如前任一项所述的方法被执行。
本申请还提供了一种计算机程序产品,当所述计算机程序产品被计算机设备执行时,如前任一项所述的方法被执行。
本申请还提供了一种计算机设备,所述计算机设备包括:
一个或多个处理器;
存储器,用于存储一个或多个计算机程序;
当所述一个或多个计算机程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如前任一项所述的方法。
需要注意的是,本申请可在软件和/或软件与硬件的组合体中被实施,例如,可采用专用集成电路(ASIC)、通用目的计算机或任何其他类似硬件设备来实现。在一个实施例中,本申请的软件程序可以通过处理器执行以实现上文所述步骤或功能。同样地,本申请的软件程序(包括相关的数据结构)可以被存储到计算机可读记录介质中,例如,RAM存储器,磁或光驱动器或软磁盘及类似设备。另外,本申请的一些步骤或功能可采用硬件来实现,例如,作为与处理器配合从而执行各个步骤或功能的电路。
另外,本申请的一部分可被应用为计算机程序产品,例如计算机程序指令,当其被计算机执行时,通过该计算机的操作,可以调用或提供根据本申请的方法和/或技术方案。本领域技术人员应能理解,计算机程序指令在计算机可读介质中的存在形式包括但不限于源文件、可执行文件、安装包文件等,相应地,计算机程序指 令被计算机执行的方式包括但不限于:该计算机直接执行该指令,或者该计算机编译该指令后再执行对应的编译后程序,或者该计算机读取并执行该指令,或者该计算机读取并安装该指令后再执行对应的安装后程序。在此,计算机可读介质可以是可供计算机访问的任意可用的计算机可读存储介质或通信介质。
通信介质包括藉此包含例如计算机可读指令、数据结构、程序模块或其他数据的通信信号被从一个系统传送到另一系统的介质。通信介质可包括有导的传输介质(诸如电缆和线(例如,光纤、同轴等))和能传播能量波的无线(未有导的传输)介质,诸如声音、电磁、RF、微波和红外。计算机可读指令、数据结构、程序模块或其他数据可被体现为例如无线介质(诸如载波或诸如被体现为扩展频谱技术的一部分的类似机制)中的已调制数据信号。术语“已调制数据信号”指的是其一个或多个特征以在信号中编码信息的方式被更改或设定的信号。调制可以是模拟的、数字的或混合调制技术。
作为示例而非限制,计算机可读存储介质可包括以用于存储诸如计算机可读指令、数据结构、程序模块或其它数据的信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动的介质。例如,计算机可读存储介质包括,但不限于,易失性存储器,诸如随机存储器(RAM,DRAM,SRAM);以及非易失性存储器,诸如闪存、各种只读存储器(ROM,PROM,EPROM,EEPROM)、磁性和铁磁/铁电存储器(MRAM,FeRAM);以及磁性和光学存储设备(硬盘、磁带、CD、DVD);或其它现在已知的介质或今后开发的能够存储供计算机系统使用的计算机可读信息/数据。
在此,根据本申请的一个实施例包括一个装置,该装置包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发该装置运行基于前述根据本申请的多个实施例的方法和/或技术方案。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤, 单数不排除复数。装置权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。
Claims (37)
- 一种在容器云上部署图像识别服务的方法,其中,所述方法包括:在部署完成图像识别服务中的基础服务后,获取所述图像识别服务中图像识别业务服务对应的部署文件,其中,所述部署文件中包含所述图像识别业务服务中每个业务服务对应的服务名称、镜像文件地址、容器集数量、配置服务地址,所述图像识别业务服务中的业务服务包括以下至少一项:图像识别管理服务、前端资源服务、索引服务、至少一个识别服务、特征提取服务、账号服务、内容管理服务、发布服务、图像识别API服务、资源存储服务;对于所述图像识别业务服务中每个业务服务,根据所述部署文件在容器云上创建容器集并启动该业务服务,通过所述容器集根据该业务服务对应的配置服务地址加载对应的配置文件,并通过容器管理平台对该业务服务进行管理,其中,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;其中,通过所述容器云部署的所述图像识别业务服务执行以下至少任一项:通过所述发布服务接收针对第一识别图的图像发布服务请求,获得所述第一识别图,并将所述第一识别图提供给所述索引服务;通过所述索引服务获得所述第一识别图,生成所述第一识别图对应的第一索引文件,并将所述第一索引文件对应的第一存储地址返回所述发布服务;通过所述发布服务获得所述第一存储地址,将所述第一存储地址提供给所述至少一个识别服务中与所述第一识别图对应的第一图集相对应的第一识别服务;通过所述第一识别服务获得所述第一存储地址,根据所述第一存储地址,加载所述第一索引文件;或者,通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;通过所述图像识别API服务从所述基础服务中的数据库服务获得所述至少一个识别服务中所述用户图集对应的第二识别服务,将所述待识别图片及所述第二识别服务提供给所述特征提取服务;通过所述特征提取服务获得所述待识别图片及所述第二识别服务,提取所述待识别图片的特征信息,并将所述特征信息提供给所述第二识别服务;通过所述第二识别服务获得所述特征信息,将所述特征信息与所述第二识别服务当前已加载的索引文件进行匹配;若匹配成功,通过所述 第二识别服务获得与所述特征信息相匹配的第二索引文件对应的第二识别图信息,并将所述第二识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述第二识别图信息,从所述基础服务获得所述第二识别图信息对应的第二AR素材,并将所述第二AR素材返回至所述目标应用。
- 根据权利要求1所述的方法,其中,所述基础服务包括以下至少一项:配置服务;数据库服务;文件存储服务;缓存数据库服务;镜像仓库服务;配置编辑器服务。
- 根据权利要求1所述的方法,其中,所述对于所述图像识别业务服务中每个业务服务,根据所述部署文件在容器云上创建容器集并启动该业务服务,包括:对于所述图像识别业务服务中每个业务服务,根据所述部署文件中该业务服务对应的容器集数量,在容器云上创建该业务服务对应的、所述容器集数量的容器集,根据所述部署文件中该业务服务对应的镜像文件地址,下载该业务服务对应的镜像文件,并根据该镜像文件在所述容器集上启动该业务服务。
- 根据权利要求1所述的方法,其中,所述图像识别管理服务用于管理所述至少一个识别服务;其中,所述方法还包括:对于所述至少一个识别服务中的每个识别服务,在该识别服务启动时,根据所述图像识别管理服务的域名信息和/或地址信息,向所述图像识别管理服务发送注册信息;通过所述图像识别管理服务接收所述注册信息,根据所述注册信息生成该识别服务的相关信息,并将该识别服务的相关信息存储于所述基础服务中的数据库服务。
- 根据权利要求4所述的方法,其中,所述方法还包括:对于所述至少一个识别服务中的每个已启动的识别服务,通过该已启动的识别服务定时向所述图像识别管理服务发送心跳信息;若所述图像识别管理服务在预定时间间隔内未收到所述至少一个识别服务中的第三识别服务发送的心跳信息,则在所述至少一个识别服务中确定第四识别服务,从所述 基础服务中的数据库服务获得所述第三识别服务对应的当前加载图集信息,以在所述第四识别服务中加载所述当前加载图集信息所对应的图集。
- 根据权利要求5所述的方法,其中,所述在所述至少一个识别服务中确定第四识别服务,包括:若所述图像识别管理服务接收到所述至少一个识别服务中的新启动的第五识别服务发送的注册信息,通过所述图像识别管理服务将所述第五识别服务确定为所述第四识别服务。
- 根据权利要求5所述的方法,其中,所述在所述至少一个识别服务中确定第四识别服务,包括:通过所述图像识别管理服务从所述数据库服务获取所述至少一个识别服务中的每个已启动的识别服务的当前加载图集信息;通过所述图像识别管理服务根据所述每个已启动的识别服务的当前加载图集信息,确定第四识别服务,其中,所述第四识别服务满足以下至少一项:当前未加载任何图集;当前已加载的图集数量最少;当前已加载的图集中识别图像数量最少。
- 根据权利要求1所述的方法,其中,所述方法还包括:对于待处理图像服务请求,若所述待处理图像服务请求对应的目标业务服务已部署在多个容器集上,通过所述容器管理平台根据所述多个容器集中每个容器集的负荷信息,从所述多个容器集中确定目标容器集,并通过所述目标容器集上部署的所述目标业务服务来处理所述待处理图像服务请求。
- 根据权利要求1所述的方法,其中,所述方法还包括:通过所述容器管理平台监控已创建的一个或多个容器集的运行状态信息,若监控到目标容器集的负荷信息满足预定扩容条件,创建一个或多个第二目标容器集,并在所述一个或多个第二目标容器集上部署所述目标容器集对应的业务服务。
- 根据权利要求1所述的方法,其中,所述方法还包括:响应于针对目标容器集的扩容指令,通过所述容器管理平台创建一个或多个第二目标容器集,并在所述一个或多个第二目标容器集上部署所述目标容器集对应的业务服务。
- 根据权利要求1所述的方法,其中,所述方法还包括:若所述容器管理平台确定目标用户图集满足预定的并发加载条件,确定所述目标用户图集对应的一个或多个并发识别服务;通过所述一个或多个并发识别服务中每个并发识别服务分别加载所述目标用户图集。
- 根据权利要求11所述的方法,其中,所述确定所述目标用户图集对应的一个或多个并发识别服务,包括:从所述至少一个识别服务中已部署的识别服务中确定所述目标用户图集对应的一个或多个并发识别服务。
- 根据权利要求11所述的方法,其中,所述确定所述目标用户图集对应的一个或多个并发识别服务,包括:创建一个或多个第二目标容器集,在所述一个或多个第二目标容器集中每个第二目标容器集上分别部署一个或多个第六识别服务,并将所述一个或多个第六识别服务作为所述目标用户图集对应的一个或多个并发识别服务。
- 根据权利要求1所述的方法,其中,所述方法还包括:若所述容器管理平台确定目标用户图集满足预定的划分条件,将所述目标用户图集划分为互不相交的多个子集,其中,所述多个子集中的每个子集包括至少一个识别图;确定所述目标用户图集对应的一个或多个识别服务;通过所述一个或多个识别服务中的每个识别服务分别加载所述多个子集中的一个子集,其中,不同识别服务对应不同子集。
- 一种基于容器云上部署的图像识别服务的图像发布的方法,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别业务服务进行管理,所述图像识别业务服务中的业务服务包括以下至少一项:前端资源服务、索引服务、至少一个识别服务、内容管理服务、发布服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;其中,所述方法包括:通过所述发布服务接收针对目标识别图的图像发布服务请求,获得所述目标识别图,并根据所述索引服务的服务地址将所述目标识别图提供给所述索引服务;通过所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件对应的目标存储地址返回所述发布服务;通过所述发布服务获得所述目标存储地址,将所述目标存储地址提供给所述至少一个识别服务中与所述目标识别图对应的目标图集相对应的目标识别服务;通过所述目标识别服务获得所述目标存储地址,根据所述目标存储地址,加载所述目标索引文件。
- 根据权利要求15所述的方法,其中,所述方法还包括在所述发布服务接收针对目标识别图的图像发布服务请求,获得所述目标识别图,并根据所述索引服务的服务地址将所述目标识别图提供给所述索引服务,之前:通过所述前端资源服务接收用户针对目标识别图的操作信息,将所述操作信息转发到内容管理服务;通过所述内容管理服务根据所述操作信息,获得所述目标识别图及所述目标识别图对应的目标图集,更新所述图像识别服务对应的基础服务中的数据库服务中的所述目标识别图的相关信息,生成针对所述目标识别图的图像发布服务请求并发送至所述发布服务。
- 根据权利要求15所述的方法,其中,所述通过所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件对应的目标存储地址返回所述发布服务,包括:通过所述索引服务获得所述目标识别图,生成所述目标识别图对应的目标索引文件,并将所述目标索引文件提供给所述图像识别服务对应的基础服务中的文件存储服务;通过所述文件存储服务获得所述目标索引文件,存储并获得所述目标索引文件对应的目标存储地址,并将所述目标存储地址返回所述索引服务;通过所述索引服务获得所述目标存储地址,并将所述目标存储地址返回所述发布服务。
- 根据权利要求15所述的方法,其中,所述通过所述发布服务将所述目标存储地址提供给所述至少一个识别服务中与所述目标识别图对应的目标图集相对应的目标识 别服务,包括:通过所述发布服务从所述图像识别服务对应的基础服务中的数据库服务获得所述目标图集对应的发布状态指示信息;若所述发布状态指示信息指示所述目标图集已发布,通过所述发布服务从所述数据库服务获得所述至少一个识别服务中所述目标图集对应的目标识别服务,并根据所述目标识别服务的服务地址将所述目标存储地址提供给所述目标图集对应的目标识别服务;若所述发布状态指示信息指示所述目标图集未发布,通过所述发布服务从所述至少一个识别服务中已部署的识别服务中确定目标识别服务,并根据所述目标识别服务的服务地址将所述目标存储地址提供给所述目标识别服务。
- 根据权利要求18所述的方法,其中,所述通过所述发布服务从所述至少一个识别服务中已部署的识别服务中确定目标识别服务,包括:通过所述发布服务从所述数据库服务获得所述至少一个识别服务中已部署的识别服务对应的当前加载图集信息;通过所述发布服务根据所述当前加载图集信息,从所述已部署的识别服务中确定目标识别服务,其中,所述目标识别服务对应的当前加载信息满足以下至少一项:当前已加载的图集数量最少;当前已加载的图集中的识别图数量最少。
- 根据权利要求15所述的方法,其中,所述方法还包括:对于所述图像发布服务请求,若所述图像发布服务请求对应的目标业务服务已部署在多个容器集上,通过所述容器管理平台根据所述多个容器集中每个容器集的负荷信息,从所述多个容器集中确定目标容器集,并通过所述目标容器集上部署的所述目标业务服务来处理所述图像发布服务请求。
- 根据权利要求15所述的方法,其中,所述方法还包括:通过所述容器管理平台监控已创建的一个或多个容器集的运行状态信息,若监控到目标容器集的负荷信息满足预定扩容条件,创建一个或多个第二目标容器集,并在所述一个或多个第二目标容器集上部署所述目标容器集对应的业务服务。
- 根据权利要求15所述的方法,其中,所述方法还包括:响应于针对目标容器集的扩容指令,通过所述容器管理平台创建一个或多个第二目标容器集,并在所述一个或多个第二目标容器集上部署所述目标容器集对应的业务服 务。
- 根据权利要求15所述的方法,其中,所述方法还包括:若所述容器管理平台确定目标用户图集满足预定的并发加载条件,确定所述目标用户图集对应的一个或多个并发识别服务;通过所述一个或多个并发识别服务中每个并发识别服务分别加载所述目标用户图集。
- 根据权利要求15所述的方法,其中,所述方法还包括:若所述容器管理平台确定目标用户图集满足预定的划分条件,将所述目标用户图集划分为互不相交的多个子集,其中,所述多个子集中的每个子集包括至少一个识别图;确定所述目标用户图集对应的一个或多个识别服务;通过所述一个或多个识别服务中的每个识别服务分别加载所述多个子集中的一个子集,其中,不同识别服务对应不同子集。
- 根据权利要求15所述的方法,其中,所述图像识别业务服务中的业务服务还包括图像识别管理服务,所述图像识别管理服务用于管理所述至少一个识别服务;其中,所述方法还包括:对于所述至少一个识别服务中的每个识别服务,在该识别服务启动时,根据所述图像识别管理服务的域名信息和/或地址信息,向所述图像识别管理服务发送注册信息;通过所述图像识别管理服务接收所述注册信息,根据所述注册信息生成该识别服务的相关信息,并将该识别服务的相关信息存储于所述图像识别服务对应的基础服务中的数据库服务。
- 根据权利要求25所述的方法,其中,所述方法还包括:对于所述至少一个识别服务中的每个已启动的识别服务,通过该已启动的识别服务定时向所述图像识别管理服务发送心跳信息;若所述图像识别管理服务在预定时间间隔内未收到所述至少一个识别服务中的第七识别服务发送的心跳信息,则在所述至少一个识别服务中确定第八识别服务,从所述数据库服务获得所述第七识别服务对应的当前加载图集信息,以在所述第八识别服务中加载所述当前加载图集信息所对应的图集。
- 一种基于容器云上部署的图像识别服务的图像识别的方法,其中,所述容器云上部署有图像识别服务对应的图像识别业务服务,并通过容器管理平台对所述图像识别 业务服务进行管理,所述图像识别业务服务中的业务服务包括以下至少一项:至少一个识别服务、特征提取服务、图像识别API服务,对于所述图像识别业务服务中每个业务服务,根据部署文件在容器云上创建容器集并启动该业务服务,所述容器集加载该业务服务对应的配置文件,所述配置文件中包含该业务服务所依赖的其他业务服务的服务名称与服务地址之间的映射关系,以使该业务服务根据所述映射关系调用该业务服务所依赖的其他业务服务;其中,所述方法包括:通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集;通过所述图像识别API服务从所述图像识别服务对应的基础服务中的数据库服务获得所述至少一个识别服务中与所述用户图集相对应的目标识别服务,并根据所述特征提取服务的服务地址将所述待识别图片及所述目标识别服务提供给所述特征提取服务;通过所述特征提取服务获得所述待识别图片及所述目标识别服务,提取所述待识别图片的特征信息,并根据所述目标识别服务的服务地址将所述特征信息提供给所述目标识别服务;通过所述目标识别服务获得所述特征信息,将所述特征信息与所述目标识别服务当前已加载的索引文件进行匹配;若匹配成功,通过所述目标识别服务获得与所述特征信息相匹配的目标索引文件对应的目标识别图信息,并将所述目标识别图信息返回所述图像识别API服务,通过所述图像识别API服务获得所述目标识别图信息,从所述基础服务获得所述目标识别图信息对应的目标AR素材,并将所述目标AR素材返回至所述目标应用。
- 根据权利要求27所述的方法,其中,所述通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,获得所述待识别图片对应的用户图集,包括:通过所述图像识别API服务接收目标应用发送的、针对待识别图片的图像识别服务请求,对所述目标应用进行接入权限认证;若认证通过,获得所述待识别图片对应的用户图集。
- 根据权利要求27所述的方法,其中,所述方法还包括:对于所述图像识别服务请求,若所述图像识别服务请求对应的目标业务服务已部署 在多个容器集上,通过所述容器管理平台根据所述多个容器集中每个容器集的负荷信息,从所述多个容器集中确定目标容器集,并通过所述目标容器集上部署的所述目标业务服务来处理所述图像识别服务请求。
- 根据权利要求27所述的方法,其中,所述方法还包括:通过所述容器管理平台监控已创建的一个或多个容器集的运行状态信息,若监控到目标容器集的负荷信息满足预定扩容条件的,创建一个或多个第二目标容器集,并在所述一个或多个第二目标容器集上部署所述目标容器集对应的业务服务。
- 根据权利要求27所述的方法,其中,所述方法还包括:响应于针对目标容器集的扩容指令,通过所述容器管理平台创建一个或多个第二目标容器集,并在所述一个或多个第二目标容器集上部署所述目标容器集对应的业务服务。
- 根据权利要求27所述的方法,其中,所述图像识别业务服务中的业务服务还包括图像识别管理服务,所述图像识别管理服务用于管理所述至少一个识别服务;其中,所述方法还包括:对于所述至少一个识别服务中的每个识别服务,在该识别服务启动时,根据所述图像识别管理服务的域名信息和/或地址信息,向所述图像识别管理服务发送注册信息;通过所述图像识别管理服务接收所述注册信息,根据所述注册信息生成该识别服务的相关信息,并将该识别服务的相关信息存储于所述图像识别服务对应的基础服务中的数据库服务。
- 根据权利要求32所述的方法,其中,所述方法还包括:对于所述至少一个识别服务中的每个已启动的识别服务,通过该已启动的识别服务定时向所述图像识别管理服务发送心跳信息;若所述图像识别管理服务在预定时间间隔内未收到所述至少一个识别服务中的第九识别服务发送的心跳信息,则在所述至少一个识别服务中确定第十识别服务,从所述数据库服务获得所述第九识别服务对应的当前加载图集信息,以在所述第十识别服务中加载所述当前加载图集信息所对应的图集。
- 一种在容器云上部署图像识别服务的设备,其中,所述设备包括:处理器;以及被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理 器执行如权利要求1至14中任一项所述的方法。
- 一种基于容器云上部署的图像识别服务的图像发布的设备,其中,所述设备包括:处理器;以及被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器执行如权利要求15至26中任一项所述的方法。
- 一种基于容器云上部署的图像识别服务的图像识别的设备,其中,所述设备包括:处理器;以及被安排成存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器执行如权利要求27至33中任一项所述的方法。
- 一种存储指令的计算机可读介质,所述指令在被执行时使得系统进行如权利要求1至33中任一项所述方法的操作。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011021515.1 | 2020-09-25 | ||
CN202011021515.1A CN111930473B (zh) | 2020-09-25 | 2020-09-25 | 在容器云上部署图像识别服务的方法与设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022062304A1 true WO2022062304A1 (zh) | 2022-03-31 |
Family
ID=73335211
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/075492 WO2022062304A1 (zh) | 2020-09-25 | 2021-02-05 | 在容器云上部署图像识别服务的方法与设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111930473B (zh) |
WO (1) | WO2022062304A1 (zh) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117112144A (zh) * | 2023-09-22 | 2023-11-24 | 上海卓悠网络科技有限公司 | 一种在android系统上部署k3s的方法及系统、存储介质 |
CN117785228A (zh) * | 2024-02-22 | 2024-03-29 | 恒生电子股份有限公司 | 应用部署方法以及装置 |
CN118444934A (zh) * | 2024-07-08 | 2024-08-06 | 四川省致链数字科技有限公司 | 基于木制家具工业互联网平台的工业app运行环境部署方法 |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111930473B (zh) * | 2020-09-25 | 2021-01-01 | 亮风台(上海)信息科技有限公司 | 在容器云上部署图像识别服务的方法与设备 |
CN115134231B (zh) * | 2021-03-17 | 2024-03-08 | 北京搜狗科技发展有限公司 | 一种通信方法、装置和用于通信的装置 |
CN112905814B (zh) * | 2021-03-31 | 2024-06-18 | 北京大米科技有限公司 | 图片处理方法、装置、存储介质及电子设备 |
CN113364888B (zh) * | 2021-06-30 | 2022-05-31 | 重庆紫光华山智安科技有限公司 | 服务调度方法、系统、电子设备及计算机可读存储介质 |
CN113762192A (zh) * | 2021-09-15 | 2021-12-07 | 南方电网数字电网研究院有限公司 | 基于网关与容器技术的设备检测方法、装置和网关设备 |
CN114338709B (zh) * | 2021-12-07 | 2023-08-29 | 贵阳语玩科技有限公司 | 一种用户头像同步方法、装置、存储介质及电子设备 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107733977A (zh) * | 2017-08-31 | 2018-02-23 | 北京百度网讯科技有限公司 | 一种基于Docker的集群管理方法及装置 |
CN109522089A (zh) * | 2018-11-02 | 2019-03-26 | 成都三零凯天通信实业有限公司 | 基于虚拟化环境的分布式视图像识别方法 |
US20200167234A1 (en) * | 2018-11-28 | 2020-05-28 | International Business Machines Corporation | Efficient container based application recovery |
CN111556047A (zh) * | 2020-04-24 | 2020-08-18 | 杭州安恒信息技术股份有限公司 | 一种私有云环境下安全服务的部署方法 |
CN111930473A (zh) * | 2020-09-25 | 2020-11-13 | 亮风台(上海)信息科技有限公司 | 在容器云上部署图像识别服务的方法与设备 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108804217A (zh) * | 2017-04-26 | 2018-11-13 | 中兴通讯股份有限公司 | 一种资源调度装置、资源调度系统和资源调度方法 |
CN107786379A (zh) * | 2017-11-15 | 2018-03-09 | 四川省龙逸凤集网络科技有限公司 | 一种基于微服务架构的分层云管理平台 |
-
2020
- 2020-09-25 CN CN202011021515.1A patent/CN111930473B/zh active Active
-
2021
- 2021-02-05 WO PCT/CN2021/075492 patent/WO2022062304A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107733977A (zh) * | 2017-08-31 | 2018-02-23 | 北京百度网讯科技有限公司 | 一种基于Docker的集群管理方法及装置 |
CN109522089A (zh) * | 2018-11-02 | 2019-03-26 | 成都三零凯天通信实业有限公司 | 基于虚拟化环境的分布式视图像识别方法 |
US20200167234A1 (en) * | 2018-11-28 | 2020-05-28 | International Business Machines Corporation | Efficient container based application recovery |
CN111556047A (zh) * | 2020-04-24 | 2020-08-18 | 杭州安恒信息技术股份有限公司 | 一种私有云环境下安全服务的部署方法 |
CN111930473A (zh) * | 2020-09-25 | 2020-11-13 | 亮风台(上海)信息科技有限公司 | 在容器云上部署图像识别服务的方法与设备 |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117112144A (zh) * | 2023-09-22 | 2023-11-24 | 上海卓悠网络科技有限公司 | 一种在android系统上部署k3s的方法及系统、存储介质 |
CN117112144B (zh) * | 2023-09-22 | 2024-03-12 | 上海卓悠网络科技有限公司 | 一种在android系统上部署k3s的方法及系统、存储介质 |
CN117785228A (zh) * | 2024-02-22 | 2024-03-29 | 恒生电子股份有限公司 | 应用部署方法以及装置 |
CN117785228B (zh) * | 2024-02-22 | 2024-05-28 | 恒生电子股份有限公司 | 应用部署方法以及装置 |
CN118444934A (zh) * | 2024-07-08 | 2024-08-06 | 四川省致链数字科技有限公司 | 基于木制家具工业互联网平台的工业app运行环境部署方法 |
Also Published As
Publication number | Publication date |
---|---|
CN111930473B (zh) | 2021-01-01 |
CN111930473A (zh) | 2020-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022062304A1 (zh) | 在容器云上部署图像识别服务的方法与设备 | |
US12118341B2 (en) | Conversion and restoration of computer environments to container-based implementations | |
US11307890B2 (en) | Methods and apparatus to manage virtual machines | |
CN112019475B (zh) | 无服务器架构下的资源访问方法、设备、系统及存储介质 | |
US11405274B2 (en) | Managing virtual network functions | |
US11409712B2 (en) | Small-file storage optimization system based on virtual file system in KUBERNETES user-mode application | |
US11048591B1 (en) | Efficient name space organization in a global name space cluster | |
US9521194B1 (en) | Nondeterministic value source | |
US10411961B2 (en) | Image management in cloud environments | |
JP2016540298A (ja) | 大規模データストリームの取得、記憶、及び消費のための管理型サービス | |
US11442927B1 (en) | Storage performance-based distribution of deduplicated data to nodes within a clustered storage environment | |
CA2946307C (en) | Data defined infrastructure | |
US9781163B2 (en) | Trust overlays for disaggregated infrastructures | |
EP3518116A1 (en) | Method and apparatus for layered access of file in virtualization instance | |
WO2020029995A1 (en) | Application upgrading through sharing dependencies | |
US10203976B2 (en) | Virtual appliance management in a virtualized computing environment based on operational modes associated with virtual appliance | |
US9940329B2 (en) | System and method for providing a climate data persistence service | |
US20230195695A1 (en) | File Sharing Method and Terminal Device | |
US9779177B1 (en) | Service generation based on profiled data objects | |
US10019244B1 (en) | Interpreting program code using a symbol table | |
US20230023945A1 (en) | Orchestrating and Automating Product Deployment Flow and Lifecycle Management | |
US11074305B1 (en) | Extending data store operations using function objects | |
US20240020205A1 (en) | Data protection for stub files and cloud metadata | |
CN117435307A (zh) | 一种虚拟机迁移的方法及设备 | |
US10701145B1 (en) | Data output using message requests to a messaging service |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21870694 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21870694 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21870694 Country of ref document: EP Kind code of ref document: A1 |