Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Highly concurrent python algorithm calling method and medium based on environment isolation

A technology of environment isolation and algorithms, applied in software deployment, software design, etc., can solve problems such as depending on different environments, insufficient support, and only a few minutes, to achieve the effect of saving network resources and improving performance

Active Publication Date: 2022-02-11
中汽数据(天津)有限公司
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] 1) The execution time of general complex deep learning and machine learning algorithms is generally half an hour to a few hours, but the conventional web service call mode is HTTP request, and the HTTP connection can wait for a short time, generally only a few minutes, which is not enough to support
[0005] 2) The TPS of the conventional web service call mode can reach up to 20,000, but it cannot support the current large data volume of hundreds of thousands or millions
[0006] 3) The dependent environments of libraries that may be required by different python algorithms are different and may even conflict. When thousands of python algorithms need to be deployed, conventional server deployment cannot support
[0007] 4) The python code provided by most algorithm engineers will not use web frameworks, only algorithm scripts, which cannot be directly deployed as services

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Highly concurrent python algorithm calling method and medium based on environment isolation
  • Highly concurrent python algorithm calling method and medium based on environment isolation
  • Highly concurrent python algorithm calling method and medium based on environment isolation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0033] figure 1 It is a flow chart of a high-concurrency python algorithm calling method based on environment isolation provided by this embodiment. The method can be executed by an environment-isolated high-concurrency python algorithm calling device, which can be composed of software and / or hardware, and is generally integrated in electronic equipment.

[0034] see figure 1 , the method includes the following steps:

[0035] S110. Deploy the python algorithm script into the docker.

[0036] Preferably, the deployment of the python algorithm script into the docker includes:

[0037] According to the python algorithm script, write the container image file dockerfile, and create a mirror image containing python basic environment in different language versions;

[0038] Saving the deployment work order information to the mysql database, the deployment work order information including the script file and the language environment required by the script;

[0039] According to ...

Embodiment 2

[0077] see figure 2 , this embodiment provides a high-concurrency python algorithm calling device based on environment isolation, including:

[0078] Algorithm script deployment module 101, for deploying python algorithm script in docker;

[0079] The message queue builds and receives module 102, is used for setting up Kafka message queue and receiving message;

[0080] Algorithm calling module 103, used to call the python algorithm in the python algorithm script;

[0081] The execution result return module 104 is used to return the execution result of the python algorithm through the Kafka message queue.

[0082] The device is used for executing the above-mentioned high-concurrency python algorithm calling method based on environment isolation, and thus at least has functional modules corresponding to the method and beneficial effects.

Embodiment 3

[0084] like image 3 As shown, this embodiment provides an electronic device, including:

[0085] at least one processor; and

[0086] a memory communicatively coupled to at least one of said processors; wherein,

[0087] The memory stores instructions executable by at least one of the processors, and the instructions are executed by at least one of the processors, so that at least one of the processors can execute the above method. At least one processor in the electronic device is capable of executing the above method, and thus has at least the same advantages as the above method.

[0088] Optionally, the electronic device further includes interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be mounted on a common motherboard or otherwise as desired. The processor can process instructions executed in the electronic device, including storing in or on ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the field of software development, in particular to a method and medium for invoking a highly concurrent python algorithm based on environment isolation. The method includes deploying the python algorithm script into the docker; building and receiving a Kafka message queue; calling the python algorithm in the python algorithm script; and returning the execution result of the python algorithm through the Kafka message queue. This method implements the deployment of thousands of python algorithms on a physical machine with isolated environments by introducing docker, realizes hundreds of thousands of large data concurrency through message queues, and solves the problem of algorithm execution time by re-establishing independent message return methods The problem of being unable to receive the returned results for a long time has greatly solved the problem of inability to call due to characteristics such as large data volume, high concurrency, and long-term calculations in actual projects.

Description

technical field [0001] The invention relates to the field of software development, in particular to a method and medium for invoking a highly concurrent python algorithm based on environment isolation. Background technique [0002] Python is an object-oriented interpreted computer programming language with rich and powerful standard libraries and third-party extension libraries. Because of its simplicity and ease of learning, Python has become one of the most popular programming languages. Due to the simplicity, readability, scalability and complete free of the Python language, there are more and more institutions and personnel using Python for algorithm research at home and abroad. [0003] In practical applications, especially when combined with actual project applications, the execution of algorithms often requires large amounts of data, high concurrency, complex and long-term calculations, and the conventional algorithm call mode can no longer meet this demand. The mai...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/20G06F8/60
CPCG06F8/24G06F8/60
Inventor 张聪聪徐洋李鹏旭郝晓东辛祥彬石伟单泽萌申玲彩
Owner 中汽数据(天津)有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products