The network anchor will welcome real-name registration system’s involvement in pornography, gambling and drugs, etc., and will be blacked out (Figure)

  International online comprehensive news: The heads of more than 20 major domestic enterprises engaged in online performances (live broadcasts) jointly issued the "Beijing Webcast Industry Self-discipline Convention", promising that from the 18th, webcasting rooms must be marked with watermarks; Content storage time is not less than 15 days for future reference; All anchors must be real-name certified; For anchors who broadcast political, gun-related, drug-related, violent and pornographic content, serious cases will be blacklisted; Auditors conduct 24-hour real-time supervision on the live content on the platform.

  The brutal development of webcasting industry

  The extremely low industry threshold and the temptation to make money without leaving home make the network anchor team expand rapidly and fall into the strange circle of barbaric growth. In order to become popular, some network anchors should take off what they shouldn’t, show what they shouldn’t, do what they shouldn’t, and say what they shouldn’t, at the request of fans, in order to let the "golden master" get the so-called stimulation and pleasure. The original clean live broadcast room was made a mess.

  Low barriers to entry in the industry

  The surging webcast lowered the threshold of popularity and made it possible for many grassroots to become famous overnight — — A microphone and a camera have become the gold digging tools in cyberspace. According to media reports, on the webcast platforms such as Betta, Crouching, and Show Together, popular anchors with an annual income of millions of yuan are fully grasped, and some even earn more than 10 million yuan.

  Some anchors do whatever it takes to become popular.

  "Earn six figures a month" and "reward" … … The kaleidoscope-like webcasting makes the anchors rich and admired. At the same time, some anchors do whatever it takes to "get out of position". According to reports, an online male anchor named "play is Happy" broke into a school in Nanjing and publicly broadcast live to harass girls. What is even more paradoxical is that after the behavior of the network male anchor was stopped by the security guards in the school, his fans did not condemn the anchor but abused teachers and students online … …

  The income of network anchors mainly depends on netizens’ "reward"

  A staff member of the webcast platform revealed that the income of the network anchor mainly depends on the "reward" of netizens. As long as you are willing to take off and show off and meet the requirements of the "golden master", the "reward" will be high. Among the fans of the anchor, "local tyrants" abound, and they can spend a lot of money on their favorite anchors without even frowning. In order to make fans happy and get more "rewards", anchors naturally show their magical powers and perform heartily, making the network anchor space a low-level, vulgar and indecent place.

  A 12-year-old boy from Minhou, Fuzhou stole 30,000 yuan from his mother to give a gift to the network anchor.

  Xiaolin, a 12-year-old fifth-grade primary school boy in Minhou, stole his mother’s mobile phone to buy expensive virtual goods for the anchor in order to please his favorite network anchor, and spent nearly 30 thousand yuan a month.

  Netizens spent 50,000 yuan on gifts just to keep the female anchor calling his name.

  A fan with a live ID named "Dungeon Warrior" said that he had spent more than 10,000 yuan for his favorite female anchor since last year, which was nothing compared with those local fans who lavished millions. "In that world, as long as you spend money, you are the king. This is the feeling that watching star videos won’t happen at all. The female anchor will always interact with you. You can’t understand the satisfaction of calling your name and saying thank you and love you in front of tens of thousands of people. This gives me a sense of power and a strong sense of superiority, which makes me feel stronger than all the men in the room, especially with dignity, as if I control the world. "

  The competition in online celebrity is fierce, and the interest chains are interlinked.

  It is precisely because of online celebrity’s profitable capital that many companies, seeing the unlimited business opportunities, have started to concentrate on signing contracts and training, and input them into the live broadcast platform. "I’m Zero Egg" is a student at school. She emphasizes that she has natural characteristics without artificial synthesis. After being signed by a brokerage company, she will broadcast live on the Dragon Ball platform. In addition to the basic salary, the extra income from the live broadcast will be shared with the platform and the brokerage company. According to her, "most anchors are pushed to the live broadcast platform by brokerage companies, and some small platforms have less budgets and more direct docking with anchors." She said that even if a contracted anchor wants to get the top page, it is generally necessary for the anchor to apply for the top request with the company. "Then the company arranges the top through the registration order, but the chance of being topped is very small."

  Is it feasible for the popular anchor to enter the entertainment circle offline?

  Some people think that the live content of these eyeballs, such as posing, selling cute and playing cute, singing and telling jokes, may one day be bored by netizens. In fact, at present, some anchors have stepped out of the narrow space in their homes and gone outdoors and even internationally, and entertainment life such as travel, ball games and star conferences has gradually become live content.

  Expert suggestion: regulatory legislation needs to be refined

  Some legal experts said that because the definition of pornography in the current relevant laws is not specific enough, webcasting frequently plays "edge ball". Webcast, as a new product, should be based on its characteristics, and introduce a new basis to refine the supervision of live content, so that the live broadcast platform and practitioners can clearly understand their legal responsibilities. However, in view of the lack of protection for minors in the webcast platform, legal scholars have called for the urgent introduction of a grading system related to Internet content.

China’s accelerating L3 commercial smart driving has become an important car purchase decision for consumers.

  Recently, the Ministry of Transport issued the Technical Guide for Highway Engineering Facilities to Support Autopilot (hereinafter referred to as the Guide), proposing the overall framework and main technical indicators for highway engineering facilities to support Autopilot, which will be implemented on December 1 this year. The industry pointed out that the Guide released that China is stepping up efforts to support the development of smart car industry from the perspective of infrastructure construction, and plans to solve the bottleneck problem of intelligent networked automobile industrialization development through the "China Program" of vehicle-road-cloud integration. All-media reporters noticed that the Ministry of Industry and Information Technology recently pointed out clearly that China’s autonomous driving technology is gradually being promoted, L3 level is gradually being commercialized, and L4 level is exploring demonstration applications. haveIt shows that the proportion of intelligent driving function in Chinese consumers’ car purchase decision is increasing rapidly.

  The Guide better supports the demand for automatic driving of vehicles from the perspective of infrastructure.

  The Ministry of Transport pointed out that research and practice at home and abroad show that the practical process of autonomous driving technology can be accelerated by moderately improving the intelligent level of highway infrastructure and providing auxiliary information for autonomous vehicles according to their cognitive and behavioral characteristics.

  The release of the Guide will guide the formation of a technical system that adapts to China’s management characteristics. It is reported that the Guide takes into account the characteristics of China’s traffic and environment, adopts a technical framework combining "end-edge-cloud" and establishes a technical system for highway engineering facilities to support autonomous driving. Through the information processing and interaction of "edge", edge cloud and central cloud are formed, which provide data support for road section level, provincial (regional) level and Ministry (national) level management platforms respectively. The technical system fully considers the characteristics of the management system, which is convenient for rapid popularization and application and related construction.

  The Ministry of Transport also pointed out that it is not easy for highway engineering facilities to support autonomous driving. In the process of determining technical indicators, the Guide fully considered the actual situation of existing highway engineering facilities. Under the overall technical framework of highway engineering facilities supporting autonomous driving, it analyzed and studied the role and influence of highway engineering facilities supporting autonomous driving, and put forward functional requirements, performance requirements and layout requirements for supporting autonomous driving.

  In recent years, China’s intelligent networked automobile industry has developed rapidly. According to the figures of the Ministry of Industry and Information Technology, 17 national-level test demonstration zones and 7 national-level test demonstration zones have been built nationwide.Pilot area, 16Pilot cities for coordinated development of infrastructure and intelligent networked vehicles. Up to now, China has opened more than 20,000 kilometers of test roads, with a total test mileage of more than 70 million kilometers.

  The commercialization of high-order autonomous driving is accelerating.

  In 2025, the newly added output value will exceed 1 trillion yuan.

  All-media reporters have noticed that many national departments have made important instructions on the development of autonomous driving many times recently. At the 2023 World Intelligent Networked Automobile Conference held on September 21st, Xin Guobin, a member of the Party Group and Vice Minister of the Ministry of Industry and Information Technology, revealed that the Ministry of Industry and Information Technology is deepening the pilot demonstration of intelligent networked automobile access and on-road operation, accelerating the demonstration application of "vehicle-Lu Yun integration" at the city level, and forming a number of characteristic demonstration projects with the participation of domestic and foreign market players. "The Ministry of Industry and Information Technology will work with the Ministry of Public Security, the Ministry of Communications, the Ministry of Housing and Urban-Rural Development and other departments to speed up the pilot of intelligent networked vehicle access and road traffic, and support the commercial application of L3 and higher autopilot functions. At present, the preliminary preparations for this work have been basically completed and entered the final release process. " At the Global Smart Car Industry Conference held on September 28th, Wu Feng, Director of Automobile Management Department of Equipment Industry Division I of the Ministry of Industry and Information Technology, further revealed the above information.

  According to the data of the Ministry of Industry and Information Technology, in 2022, the sales of new intelligent networked passenger cars equipped with assisted automatic driving systems in China reached 7 million, up 45.6% year-on-year, and the market share increased to 34.9%. In the first half of this year, the sales volume of new passenger cars with combined driving assistance reached 42.4%, an increase of nearly 10% compared with the same period last year. At present, many car companies are ready to mass-produce L3-class vehicles.

  "At present, the global intelligent network.Investment in technology research and development continues to increase, and autonomous driving technology is gradually maturing. L2-class assisted driving has achieved scale application and function expansion, L3-class is gradually commercialized, and L4-class is exploring demonstration application. The "China Scheme" of car-Lu Yun integration is the key to solve the problem of intelligent networked car industrialization.

  According to the data of the National Intelligent Networked Automobile Innovation Center, by 2025, the new output value of China’s intelligent networked automobile industry will exceed 1 trillion yuan.

  L3′ s intelligent driving heats up, driving the industrial chain to have multiple daily limit.

  "The latest research shows that smart driving has shown signs of breaking the ice in the factors that are important for car purchase decision-making, accounting for a substantial increase. This provides a lot of product applications for autonomous driving companies, mass production on the train, and opportunities to achieve good user word-of-mouth closed loop and commercialization closed loop. "Su Tan, general manager of the Smart Car Business Department of the Intelligent Driving Business Group (IDG), believes that intelligent driving has become a key factor in the core car purchase decision, "especially in the range of 150,000-250,000 and the price range of 250,000-300,000.In automobiles, the penetration rate of core intelligent driving is increasing very fast, almost doubling in two years. "

  It is a glimpse of this trend. The reporter noticed that Internet companies and start-ups such as Huawei, Xiaoma Zhixing, which have been deeply involved in the field of intelligent driving for many years, have intensively landed high-end technologies for intelligent driving on mass-produced new cars in recent years. For example, the new M7, which has been highly concerned recently, has won 50,000 units in just 25 days. One of its biggest selling points is that it is equipped with Huawei ADS2.0 advanced intelligent driving system, which can realize high-speed and urban advanced intelligent driving without relying on high-precision maps. According to the data released by Yu Chengdong, the managing director of Huawei, the terminal BGCEO and the chairman of smart car solutions, 70% of MAX customers have installed Huawei’s ADS advanced smart driving package. In addition, it is also accelerating the landing of intelligent driving to achieve "hegemony" with Huawei. At present, Baidu Apollo’s high-level intelligent driving system has taken the lead in the new car of Dongfeng Lantu, and then the Extreme Yue 01, which cooperates with Geely, will also be available.

  The reporter noticed that due to the continuous warming of the concept of intelligent driving, many stocks in the A-share sector have recently taken turns to rise, and even batch daily limit has appeared. October 9, the first trading day after the A-share festival,Shares are particularly active, among whichIndustrial chain stocks performed brilliantly, asking the manufacturers of the new M7.One word daily limit, another model partnerDaily limit, parts supplierDaily limit

  Lu Jiamin said that L3′ s representative function is high-speed and the city NOA is gradually getting on the bus. Driven by the three core factors of policy, technology and cost, the turning point of intelligent driving is gradually emerging. At this stage, the focus is on intelligent key vehicle enterprises and intelligent industrial chain core component enterprises. "At the same time, driven by the three core factors of policy stimulus, intelligent catalysis and inventory cycle switching, we are optimistic that the sales volume, profitability and valuation of the automobile sector are expected to continue to improve from 23Q3. Optimistic about industrial chain stocks with smart driving technology as the core selling point. " Some institutional analysts believe that with the further acceleration of the landing of smart drivers, relevant listed companies may enter.Redemption period

"Avatar: The Way of Water" finally appeared, and even 3D glasses exploded!

Special feature of 1905 film network Officially unveiled! On December 14th, (hereinafter referred to as) took the lead in opening the screening before the domestic release to meet the first audience.

According to the data of Lighthouse Professional Edition, up to now, the box office of the first day of the film has broken 22 million, accounting for nearly 80% of the box office, and the total box office of point screening and pre-sale has broken 170 million.

Avatar 2 is only released in 3D in China, and there is no 2D version. The audience’s great expectations for Avatar 2 are also in 3D visual effects. Good 3D content needs good projection technical support, and high-quality 3D glasses are also indispensable. A pair of good 3D glasses can bring a clearer and more stereoscopic impression.

"Avatar 2" has hit in an all-round way. Are there any 3D glasses in domestic cinemas? 1905 Film Network consulted a number of cinemas and learned that there are different situations. Some are stepping up the replenishment of stocks, and some are well stocked, so they are temporarily on hold.

For example, Tony chen, the head of Jiangxi Yuemu Studios, told us that all its chain studios are urgently buying 3D glasses. "Each studio has about 1,000 seats, so there will be 2,000 pairs of glasses."

"Ordinary studios generally don’t stock too many 3D glasses. The main reason is that the number of 3D movies in China is still relatively small, and it can’t be too much in a year." Xie Xingxin, manager of Chongqing Baisha International Studios, explained. In general, the ratio of the number of 3D glasses to the number of seats in a cinema is 1:1.5-1:2, that is, 150 to 200 pairs of 3D glasses for 100 seats. These glasses have a long service life under good maintenance. Except for cinemas that don’t provide free glasses and sell 3D glasses, they usually prepare a certain amount of goods.

So, for the enterprises specializing in the production and supply of 3D glasses, what business changes have they experienced in the 13 years since Avatar 2? Can the arrival of Avatar 2 drive a new wave of demand for 3D glasses products and improve the technical quality?

In this regard, 1905 Film Network visited three domestic enterprises that produce and supply 3D glasses. Because of the arrival of Avatar 2, they unanimously said — — Orders for 3D glasses have exploded recently.


"Orders and production lines are all full. At present, there are millions of orders received, all of which are trying to stock up for customers. According to this demand ratio, this month’s output may exceed 10 million pairs. "

Liu Bingbing, general manager of Shenzhen Future Stereo Technology Co., Ltd. told us that the average annual output of the company’s brand "Geduowei" 3D glasses is 30-40 million pairs. Because of Avatar 2, at least a quarter of the annual output is concentrated this month.

Established in 2009, Future Stereo is one of the earliest enterprises in China to manufacture 3D glasses, and now there are 2,000-3,000 cinemas in cooperation with all parts of the country. Liu Bingbing said that since Avatar 2 was finalized overseas in early November, they predicted that it would land in China mainland cinemas and increase the production of 3D glasses ahead of schedule.

Time Huaying is also an early enterprise in China to develop, produce and sell cinema 3D systems and 3D glasses. It has more than 20 million pairs of medium and large-sized 3D glasses production bases with annual production capacity, and its 3D brand "Feidio" mainly cooperates with China Film and Wanda.

Time Huaying introduced that they had already made full preparations for the release of Avatar 2. After the file was finalized, major studios and cinemas quickly placed orders, and the order volume of 3D glasses reached millions, which was more than 10 times higher than the average monthly shipment.

3D glasses manufacturer Hengchuang Bora is also accelerating production, "obvious changes. Because of "Avatar 2", the demand for 3D glasses in cooperative studios has increased a lot. In recent years, there has been no business and a lot fewer workers. Now I am busy and the production is really tight. " Huang Shuisong, a staff member of Hengchuang Bora, said.

According to the annual shipment trend chart of 3D glasses provided by Time Huaying, the company’s shipment of 3D glasses reached its peak in 2017, and then gradually declined, reaching its lowest point in 2020 due to the epidemic. In the past two years, shipments have shown a slow growth trend.

Times Huaying 3D glasses annual shipment trend chart

Time Huaying explained that around 2017, most studios chose to sell 3D glasses, which led to the sales of 3D glasses. Since then, due to a large number of "pseudo-3D" movies, 3D movies specially provided by China, and the uneven screening equipment, a series of problems at the content end and the restoration end have greatly reduced the effect of 3D movies, and watching 3D movies is dark and dizzy, causing many viewers to start to resist and resist 3D movies.

From the data point of view, according to the statistics of the Motion Picture Association of America, the global box office revenue of 3D movies decreased from 21% in 2017 to 6% in 2020, and rose to 7% in 2021. According to the statistics of 1905 Movie Network, the number of domestic (including co-production) live-action 3D movies has gradually increased from one in 2011 to 26 in 2016, and then it has also decreased year by year. By 2021, only two domestic 3D live-action movies will be released.

It can be seen that the popularity of 3D movies has indeed declined since 2017, and the demand for 3D glasses has also decreased with the coldness of the 3D movie market.

Liu Bingbing’s feelings about this are particularly obvious. "Especially in the past three years, many 3D suppliers have closed down. Because our company’s future technology has always adhered to overseas markets, there are still relatively many 3D movies released from India to the United States, so the shrinkage in the whole industry is not too serious. "

Similarly, Hengchuang Bora has also focused on the foreign trade market in recent years. Huang Shuisong revealed that the average annual sales of 3D glasses produced by the company now reach 50 million pairs, which are mainly sold to overseas markets. The average annual sales in China are about 6 million pairs, accounting for less than 15%. Now, because of Avatar 2, the supply of 3D glasses has been promoted instantly.

In addition to ordinary 3D, Avatar 2 also released CINITY, IMAX3D, DolbyCinema, China Giant Screen and other versions. Different special effects halls have 3D glasses with different standards, which cannot be used universally.

Take IMAX as an example. When Avatar was released in 2010, there were only 14 IMAX theaters in China, and the tickets of major IMAX theaters were sold out quickly. In 2021, Avatar was re-released in 716 IMAX studios nationwide, setting a record for the first weekend of IMAX re-released films in China. Avatar not only directly promoted the full blossom of IMAX cinemas in China, but also upgraded the laser IMAX from the first generation to the third generation. It is worth noting that the 3D glasses of the three generations of laser IMAX cinemas are not different and cannot be used with each other.

If the cinema does not provide 3D glasses for free, the audience needs to buy them according to the specifications of the cinema, and different brands have different quality and price. Under the influence of the epidemic, for the sake of safety and hygiene, the demand for 3D glasses purchased by the audience will increase, which will undoubtedly usher in a wave of benefits for 3D glasses sellers.


Although domestic cinemas sell 3D glasses, most of them are mainly provided free of charge. Nowadays, the profits of selling 3D glasses in cinemas are relatively low.

Zener International Studios currently has 26 chain studios in China. Li Bin, assistant general manager, said that before 2016, the sales of 3D glasses in studios were good. Later, the competition among studios was fierce, and the 3D fever ebbed, so it was basically provided to the audience free of charge.

At present, there are 40,000 pairs of 3D glasses in the studio, and the purchase price a few years ago was close to 5 yuan. "This time, let’s take the opportunity of Avatar 2 to clean up the inventory. The prices of different 3D glasses range from 10-30 yuan, and basically do a 50% discount package tying."

3D glasses are also products with small profits but quick turnover, mainly relying on low profits, low prices and expanding sales to increase revenue.

From Ma Yuwu, the head of Beijing Xiwang International Studios, who provided us with a price list of 3D glasses promoted by a merchant, we can see that the general cost of 3D glasses is low — —

"Ordinary model /0.2mm/0.88 yuan, children model /0.2mm/0.90 yuan, hanging clip model /0.2mm/0.70 yuan, clip model /0.7mm/3.5 yuan (unit price of more than 1000 sets); There is also a batch of 3D glasses (giant screen model /0.28, Skyworth model /0.4 double antibody, bicolor model /0.28). "

The production threshold of 3D glasses is low, and many 3D glasses made by small enterprises and family workshops on the market do not meet the certification standards. There are not many domestic enterprises with big brands and a certain production scale. After a large number of unqualified 3D glasses manufacturers join the production team, they will have a great impact on the big manufacturers in terms of quality and price.

"When the first Avatar was released, a pair of 3D glasses could be sold at an ex-factory price of 200 yuan in 300 yuan and 700 yuan in 800 yuan. Nowadays, the ex-factory price of 3D glasses is more than one piece at most. In recent years, the volume has been serious, which has led to malicious price competition, so it basically does not make money. Even if Avatar 2 comes, our price is the lowest, and it is great that a pair of 3D glasses can earn five cents at most. We also want to make more orders overseas. "

Liu Bingbing said that if the sci-fi blockbuster released in the Spring Festival in 2023 can also be released in 3D, it will greatly stimulate the sales of 3D products together with Avatar 2. He hopes that Avatar 2 can stimulate the high-quality enjoyment of domestic 3D viewing and indirectly promote the quality and effect of 3D movies in China. Because only good 3D movies can have good 3D glasses.

Even if 3D glasses can be supplied to amusement parks, theme parks, science and technology museums, aquariums, 3D TVs, home private cinemas and other places of entertainment, cinemas are still the main core supply target.

Time Huaying is also optimistic about the future prospects of the 3D glasses industry. "With the market growth, the glasses factory gradually turned to automatic production, increased production capacity, and the price of glasses gradually rationalized. The audience’s requirements for the quality of 3D glasses increased, and more people chose high-quality 3D glasses with high contrast and high transmittance."

The ultimate 3D effect created by Avatar 2 and the audience’s high pursuit of 3D viewing experience will force the cinema 3D projection technology and the quality of 3D glasses to be upgraded. When excellent 3D content is blessed by high-quality projection equipment and viewing equipment, viewers who love watching 3D movies will definitely return to the cinema.

Strive for "Ping-pong" and "Ping-pong" is wonderful —— The Fourth Table Tennis Competition of Loudi Intermediate People’s Court

Strive for table tennis.

Table tennis is wonderful.

The Fourth Table Tennis Competition of Intermediate People’s Court

Exercise stretches health,

Competition inspires vitality.

On the sports stage,

Let’s work together-

With sweat and hard work,

With strength and tenacity,

Write poems of life!

opening ceremony

In order to enrich the cultural construction of the court and fully display the healthy spirit of the police, the Loudi Intermediate People’s Court held the fourth table tennis competition on the evening of December 13th and 14th. Li Zhengming, Party Secretary and Dean of the Intermediate People’s Court, attended the event. Xia Ziwei, member of the party group and vice president of the Intermediate People’s Court, made an opening speech.

Player style

Based on the principle of "national fitness, joint participation", a total of eight teams were formed to participate in the competition. On the field, the athletes were enthusiastic and devoted themselves to the competition, such as the straight shot, the horizontal shot, the spike, the spin ball, the curveball … Everyone chased after me, not to be outdone, and the wonderful moments were constantly staged, with cheers and applause one after another. The players showed their achievements, confidence and style. Every game, adhering to the belief of "never give up until the ball hits the ground", shows the energetic, combative and enterprising spirit of the court people in the new era.

After fierce competition, a total of 1 first prize was produced; 2 second prizes; 3 third prizes; 2 outstanding organization awards; 2 outstanding athletes.

Everyone has said that through this competition, they have strengthened their physique, tempered their will and exercised their team. In the future work, we will gather the courage and fearlessness shown in the competition into full enthusiasm for work, and make greater contributions to the sprint and the high-quality development of the court at the end of the year!

Original title: "Strive for" Ping-pong "Bo, and" Ping-pong "is wonderful-the Fourth Table Tennis Competition of Loudi Intermediate People’s Court"

Read the original text

Jin Hyundai: The company has become the first batch of ecological partners of Baidu Wenxin.

Jin Hyundai said,The company has applied NLP (Natural Language Processing), OCR (Optical Character Recognition) and image recognition technologies in some software systems.At present, the specific application scenarios include:1) Automatic labeling of cadre evaluation.NLP technology is used to label all kinds of documents and materials of cadre evaluation automatically, which breaks through the integration of text multi-classification, semantic recognition and rule engine, and the accuracy of labeling is over 95%, which is completely practical.2) Intelligent search of knowledge base documents.Based on NLP technology, word segmentation, entity recognition and text similarity processing are carried out for document titles and contents, and a labeling system is established to label all documents. Under the traditional search strategy of text matching and sorting, intelligent search based on tags and semantic network is realized, and the accuracy of search results is greatly improved, which is closer to the needs of users.3) Text extraction of biomedical equipment report.Using OCR technology, the experimental reports of biomedical equipment (editable PDF and scanned PDF, etc.) are accurately extracted, which avoids the problems of low efficiency and error-prone caused by manual copying, and solves the problems of small font recognition and table breakage recognition.4) Image recognition of live equipment.OCR technology is used to identify and extract the instrument and interface data of power equipment, which greatly improves the efficiency of manual inspection. Compared with the general OCR model, it further solves the problems of identifying special characters (such as ω, μ) in the power field.5) Intelligent pre-examination of project data.Using image recognition and OCR technology, the key information of the project can be automatically recognized from the paper report image, and seals and signatures of different colors, shapes and sizes can be recognized at the same time. With the company’s further research on artificial intelligence technology and the implementation of measures such as the company’s access to Baidu Wenxin Yiyan, the company will have more and more research results and application scenarios in the field of artificial intelligence in the future. At present, similar products of MOSS are not involved.

Sun Xingyi social media: Three goals and three points, a beautiful day, a good rest and a fight next week.

Live on March 12 th, in the 27th round of Premier League, Tottenham beat Nottingham Forest 3-1 at home. With this victory, Tottenham consolidated its position in the top four of the standings. After the game, Sun Xingyi, who scored a goal, expressed his joy of winning through social media.

Sun Xingyi wrote: "It’s a beautiful day to get three goals and three points. Have a good rest and recover, and fight again next week. "

At 11pm on Saturday, March 18th, Beijing time, in the 28th round of Premier League, Tottenham Hotspur will challenge Southampton away.

I put the essence of Python coroutine Pa was clean!

This article is a large amount of information, from IO multiplexing, to use the generator, then async, await realization of the principle behind it, in simple terms, the analysis was very thorough, very hardcore!

Two days for personal reasons because it did not touch a long time to write a point of Python, which involves "coroutine" program, the last time out, it is Web framework tornado unique feature, now we have async, await keyword support . Thought about its implementation, reviews the evolution of these years, feel a little bit mean.

They are single-threaded, why the original code with the low efficiency of the async, await add some asynchronous library becomes higher efficiency?

They are single-threaded, why the original code with the low efficiency of the async, await add some asynchronous library becomes higher efficiency?

If you do Python-based network or Web development, this question has puzzled, this article attempts to give an answer.

Before beginning 0x00

Firstly, Not take you browse the source codeAnd then tell you the control to achieve the original code Python standard. Instead, we will set out from the real problems, think of solutions to the problem, step by step evolution path experience solutions, and most importantly, hoping to gain knowledge in a systematic upgrade process.

This article only provides an independent direction of thinking, does not follow the historical and current actual implementation details.

Secondly, you need to read this article familiar with Python, at least understand the concept generator generator of Python.

0x01 IO multiplexing

This is the key to performance. But we are here only to explain the concept, its implementation details is not the point, which we understand Python coroutine enough, as already know enough about, advances to 0x02.

First, you want to know all the network service program is a huge loop, your business logic can be called at some point in this cycle:

defhandler (request):


# Get a new request


# To get users to write business logic function according to the route map

Handler=GET_HANDLER (Request)

Handler (Request)

Imagine your Web service of a handler, after receiving a request requires a response to the results of API calls.

For the most traditional network applications, your API requests issued to wait for a response after this time the program stops running, even new requests have to get in after the end of the response. If you rely on an API request packet loss seriously, especially in response to slow it? That will be very low throughput applications.

Many traditional Web server using multi-threading technology to solve this problem: the run handler is placed on other threads, each dealing with a request, this does not affect the new thread blocks request to enter. This problem can be solved to some extent, but for larger systems concurrent, multithreaded scheduling will bring significant performance overhead.

IO multiplexing can be done to solve the problem without the use of threads, it is provided by the operating system kernel functions, we can say specifically for this type of scenario for us. Simply put, your program encounters network IO, tells the operating system to help you staring at, while the operating system gives you a way to make you can feel free to get what IO operation has been completed. like this:

# # 操作 系统 复 复 示 示 例 代代

# Register the ID and type of IO operations to the operating system IO


# Get completed IO operations


For (IO_ID, IO_TYPE) INEvents:


Data=read_data (IO_ID)


Write_data (IO_ID, DATA)

Gring the IO multiplex logic into our server, probably like this:


Defhandler (REQ):

# do jobs here

DefCall_back (Result):

# Use the returned Result to complete the remaining work …

Call_backs [IO_ID]=CALL_BACK

# New cycle


# Get the completed IO event

IFIO_TYPE==Read: # read

Data=read (IO_ID)

Call_back=call_backs [io_id]

Call_back (data)


# Other types of IO event processing


# Get a new request

Handler (Request)

Our Handler has returned immediately for the IO operation. At the same time, each iteration will perform a callback over the completed IO, the network request no longer blocks the entire server.

The pseudo code above is only for understanding, and the details are more complicated. Moreover, it is also possible to connect the new request to the IO event from the operating system to the monitor port.

If we split the cycle part with a call_backs dictionary to a separate module, we can get an EventLoop, which is the iOLOOP provided in the Python Standard Library Asynci.

0x02 with generator to eliminate Callback

He focuses on the Handler function written in our business, after having independent iOLOOP, it now becomes like this:

# 业 业 代 代 … …

# Need an API request

Print (Result)


Here, performance problems have been resolved: We no longer need multi-threads to constantly accept new requests in the source, and don’t have to rely on the API response.

But we have also introduced a new problem. The original business logic code is now demolished. The code before requesting the API is still normal. The code after the request API can only be written in the callback function.

Here our business logic has only one API call. If there are multiple APIs, plus the call to Redis or MySQL (their essential is also a network request), the entire logic will be split, this is a burden on business development .

For some languages ??with anonymous functions (right is Java), it may also trigger a so-called "turning hell".

Next, we find way to solve this problem.

We can easily think that if the function can be suspended after running to the network IO operation, it will wake up at the breakpoint after completion.

If you are familiar with Python’s "Builder", you should find that it happens to have this feature:



Print ("Get", Value)



# 启 启 生器, we will get 2

Got=G.send (NONE)

Print (got) # 2


# Anti-start will display "get 4", which is our incoming value

Got=g.send (got * 2)

ExceptStopItemization ASE:

# Builder runs, will print (4), E.Value is the value of generator return

Print (E.Value)

There is Yield keyword in the function, and the call function will get a generator, and a key method for generator can interact with the generator.

G.send (none) runs the generator code until you encounter Yield, and return to the object, that is, 2, the generator code is stopped here until we perform G.send (got * 2) again, The 2 * 2 is also 4 to assign the value Value in front of Yield, and then continue to run the generator code.

Yield is like a door, you can send a thing from here, you can also take another thing.

If Send makes the generator to run until the next yield is over, the Send call will trigger a special exception STOPITERATION, which comes with a property Value, which is the value of the generator Return.

If we convert our Handler to a generator with Yield keyword, run it to The specific content of IO operationReturns, put the IO result back and restore the generator to run, then solve the problem of uncomfortable business code:

# 业 业 代 代 … …

# Need to execute an API request, directly put the IO request information yield


# Use the result returned by the API to complete the remaining work

Print (Result)

# This function is registered in iOLOOP, used to call back when there is a new request

Defon_Request (request):

Handler=GET_HANDLER (Request)

g=Handler (Request)

# 首 首 启 获得 获得 i 获得

IO_INFO=G.send (none)

g.send (Result)


The above example, the Handler code written by the user will not be dispersed into the callback, and the ON_Request function interacts with Callback and IOLOOP, but it will be implemented in the web framework, which is not visible to the user.

The above code is enough to give us inspiration of Callback destroyed with the builder, but there are two points:

  1. Only a network IO is initiated in business logic, but it is often more

  2. Business logic does not call other asynchronous functions (helping), but in practice, we tend to call other levels.

Let’s take a more complex example:

Among them, Request executes real IO, FUNC1, FUNC2 is only called. Obviously our code can only be written:


Ret=yieldfunc2 (re)


Deffunc2 (DATA):



# This simulation returns an IO operation, contains all information about the IO operation, where the string is simplified

Result=yield "IOJOB OF% S"% URL


For Request, we expose the IO operation to the framework through Yield.

for Func1 and func2, calling request, clearly add Yield keywords Otherwise, the request call returns a generator and will not be paused and continue to perform subsequent logic obviously errors.

This is basically that we don’t write asynchronous code in the Tornado framework without Yield from, Aysnc, AWAIT.

To run the entire calling stack, the approximate process is as follows:

  1. Call FUNC1 to get the generator

  2. Call Send (None) Start it gets the result of request (""), or generator object

  3. Send (none) Starts the generator generated by the request, gets the IO operation, registered by the frame to IOLOOP and specify a callback

  4. The Request Builder wakes up in the callback function after IO, and the generator will go to the return statement end

  5. Capture an exception to get the return value of the Request Builder, wake up the last layer of FUNC1, and get a FUNC2 generator

  6. Continue to execute …

Call FUNC1 to get the generator

Call Send (None) Start it gets the result of request (""), or generator object

Send (none) Starts the generator generated by the request, gets the IO operation, registered by the frame to IOLOOP and specify a callback

The Request Builder wakes up in the callback function after IO, and the generator will go to the return statement end

Capture an exception to get the return value of the Request Builder, wake up the last layer of FUNC1, and get a FUNC2 generator

Continue to execute …

Friends who are familiar with the algorithm and data structure encounter such a traversal logic that will be returned, can be recursively used, because the recursive use generator can not do it, we can use the stack, in fact, this is the word "call stack" origin.

With the stack, we can Connect all generators connected in series in the entire call chain to a generatorFor its constant Send, you can continue to get all IO operation information and drive the call chain advancement, and the implementation method is as follows:

  1. The first generator is in the stack

  2. Call the Send, if you get the generator, you will enter the next round iteration

  3. I encountered IO to ask Yield, let the frame sign up to iOLOOP

  4. After the IO operation is completed, the cache result is forth, enter the next round iteration, the purpose is to restore the upper function using IO results.

  5. If a generator is running, you also need to restore the upper function to the upper function.

The first generator is in the stack

Call the Send, if you get the generator, you will enter the next round iteration

I encountered IO to ask Yield, let the frame sign up to iOLOOP

After the IO operation is completed, the cache result is forth, enter the next round iteration, the purpose is to restore the upper function using IO results.

If a generator is running, you also need to restore the upper function to the upper function.

If implemented, the code is not long but the amount of information is relatively large.

It turns the entire call chain to a generator, calling the send, to complete the IO in the chain, complete these IO, continue to push the logic execution in the calling chain until the overall logic ends:

DEFWrapper (GEN):

# The first layer calls the stack


Stack.push (gen)

# Start a layer-by-layer call


# Get the top elements of the stack



IFisgenerator (item):


# Try to get the next layer call and get it in the stack

Child=item.send (Result)

Stack.push (child)

# Result Restore to NONE


# After entering the stack, enter the next loop directly, continue to explore down


# If you have an end, you will temporarily save the Result, the next step to make yourself out.


Else: # o o operation

# # I 操作 操作, Yield, Io will be woken up and temporarily saved after IO


# 走 到 here, this layer has been completed, out of the stack, the next iteration will be a layer of calling chain


# 没有有 上, the entire call chain is completed, return


Print ("finished")


This may be the most complicated part. If you look hard, it is actually as long as you understand that for the call chain in the example above, it can achieve the effect as follows:

W=Wrapper (Func1)

# Will get "IOJOB of"

W.send (none)

# 上 上 ojob foo completed the result "bar" incompart, continue to run, get "IOJOB OF"

W.send ("bar")

# 上 上 i i b 完成 完成 传 传 传 传 入 入 入 入 入 入 入 入 入 入 入 入 入

W.send ("BARZ")

With this part, the frame will be added to the matching code:

# Maintain a list of ready lists, store all completed IO events, format is (Wrapper, Result)


# After using the wrapper package, you can process IO by Send.

g=wrapper (func1)

# Take the start state directly as the result of NONE

Ready.Append ((g, none))

# Let the iOLOOP perform this function each cycle to handle the ready for IO

Ready.Append ((g, result))

# Traversing all already generators, advance it down

Forg, Result InselF.Ready:

# Use the Result to wake the builder and get the next IO operation

IO_JOB=G.send (Result)

# After the IO operation is complete, add the generator to the ready list, wait for the next round of processing.


IO_JOB, LambdareSult: Ready.Append ((g, result)

Here, the core idea is to maintain a list of ready-to-read, and IOLOOP is overwhelmed, and the generator that promotes the ready state is run down, and the new IO operation is registered. After the IO is completed, the ready, after several rounds of Ioloop iteration A Handler will eventually be executed.

At this point, we use the generator to write to write business logic to run normally.

0x04 Improved Scalability

If you can read it here, Python’s scope is basically clear.

We have already achieved one Miniature sweeping frameworkThe realization details of the standard library look great here, but the specific ideas are consistent.

Our equilation framework has a restriction, we can only use IO to operate asynchronously, although in the world of network programming and web programming, the block is basically only IO operation, but there are some exceptions, such as I want the current operation Sleep for a few seconds. The use of time.sleep will make the entire thread to block, requiring special implementation. For example, some CPU-intensive operations can be asynchronously through multi-threaded asynchronous, so that another thread notification event has been completed and followed.

Therefore, it is best to decouple an open space with the network, so that the network IO is only one of the scenes, improves the scalability.

The Python official solution is to let the user hand to block the block code. As for the IOLOOP to register IO event or open a thread completely by yourself, and provide a standard "placeholder" FUTURE, indicating that his results wait for the future Yes, some prototypes are as follows:


# Set the result

Defset_Result (Result): Pass

# 获取 结果 结果

Defresult: Pass

# 表示 表示 This Future object is not already set up.

Defdone: Pass

# Set the callback function that should be executed when he is set, you can set multiple

Defadd_done_callback (Callback): Pass

Our slight change can support Future, making the scalability stronger. Network request functions for user code:

# 现在 r es es,, 生 生 器 器 器 器 器 器 器 器

#future is understood as a placeholder


Defcallback (Result):

# Assign the placeholder when the network IO completed the callback

Fut.set_Result (Result)


Now, Request is no longer a generator, but directly returns Future.

And for the function of processing the ready list in the frame:


#future is set to be placed in the ready list

Ready.Append ((g, fut.result))

Fut=g.send (Result)

Fut.add_done_callback (callback)

0x05 development and change

Many years ago, when using Tornado, probably only one Yield keyword is available, the sweeper wants to achieve, that is, this idea, even Yield keywords and return keywords can not appear in a function, you want to run after the generator Returns a value, you need to manually Raise an exception, although the effect is the same as Return now, but it is still very awkward, not elegant.

Later, there was Yield from expression. What can it do?

It is popular, it is done what the generator Wrapper is doing the above: Calling link through the stack, it is the syntax of the Wrapper logic.

With it, the same example you can write:


# Note Yield from

Ret=yieldFromRequest ("")

# Note Yield from

Ret=yieldfromfunc2 (re)


Deffunc2 (DATA):

# Note Yield from

Result=yieldfromRequest (""+data)


# 同 上 上 实 实 实 实 实 r

Then you no longer need the brainless Wrapper function:


# Return the first request for Future

g.send (none)

# Continue to run, automatically enter FUNC2 and get the FUTURE inside it

G.send ("bar")

# Continue to run, complete the residual logic of the call chain, throw the stopiteration exception

G.send ("BARZ")

Yield from the entire call chain directly, it is already great, but it is used asynchronous programming or otherwise, and other languages ??have special-top Async, the AWAIT keyword, until the later version puts these content With dedicated Async, AWAIT keyword packaging, it is a more elegant look today.

0x06 summary and comparison

Overall, Python’s native and trip is achieved from two aspects:

  1. Based on IO multiplexing technology, the entire application is non-blocking on IO, achieving high efficiency

  2. Change the dispersed Callback code through the generator into synchronous code, reducing business writing difficulties

Based on IO multiplexing technology, the entire application is non-blocking on IO, achieving high efficiency

Change the dispersed Callback code through the generator into synchronous code, reducing business writing difficulties

There is a language of the object of the generator. Its IO fight is achieved, the evolution of the Java fight is basically exactly, the keyword is the same, and the Future class is the same than the promise.

However, it is different for this, which is different from this sweeping with the degree of GO-named GO, and does not explicitly based on the generator.

If the class ratio, you can implement the geventime of Python, which is the runtime, and Patch off the system calls to access your own Runtime, you come to the scheduling sweeper, gevent is focused on the network, based on network IO scheduling, relatively simple, The GO achieves perfect multi-core support, more complex and perfect, and creates a new CHANNEL new programming paradigm.

Author: Mao bean peanut

Getting Started: The Most Complete Zero-Basic Python Problem | Zero-Based 8 Months Python | Battle Project | Learning Python is this shortcut

Dry goods: crawling Douban short comment, movie "later we" | 38 years old NBA best player analysis | From Wanzhong to Word! Tang Dynasty 3 disappointment | Laughing to see the new Eti Dragon Slay Dollar | Running Question King | Make a massive Miss in Python Sketch | Disc, I am so fire, I use machine to learn to be a mini recommended system movie

Fun: Poultry Game | Nine Mao Hai | Beautiful Flower | Two-Article Python "Everyday Cool" game!

AI: Robot that will be poetry | Give the picture color | predictive income | Solver, I use the machine to learn to be a mini recommended system movie

Gadget: PDF to Word, easy to get forms and watermarks! | One button saves the HTML page as PDF! Goodbye PDF to extract charges! Use 90 lines of code to create the strongest PDF converter, Word, PPT, Excel, Markdown, HTML one-to-date conversion | Make a staple low-cost ticket prompt! | 60 lines of code made a voice wallpaper switch every day to see a little sister! |

Annual explosion case

  • 1). Lying! PDF to Word Use Python to easily get it!
  • 2) Learn Python is really fragrant! I made a website with 100 lines of code, helping people PS travel pictures, earn a chicken leg to eat
  • 3). The first broadcast over 100 million, hot all net, I analyzed the "Sister Taking Wind and Waves" and found these secrets
  • 4) 80 lines of code! Do a Dream in Python with Python
  • 5). You must master the 20 Python code, short and delicate, useless
  • 6). 30 python hambo skills
  • 7). I summarized 80 "rookie Python selection dry goods.pdf", all dry goods
  • 8). Goodbye Python! I want to learn Go! 2500 word depth analysis!
  • 9). Find a dog welfare! This Python reptile artifact is too cool, automatically download the girl picture