This topic provides best practice examples for the Miaoce API. You can use these examples to get started quickly and develop your business applications.
Prerequisites
- The product is activated for your Alibaba Cloud account.
- You have obtained the AgentKey, AccessKeyId, and AccessKeySecret. For more information, see Obtain an AccessKey and AgentKey.
- Obtain the workspace ID. For more information, see Obtain Workspace ID.
- To import the Miaobi SDK, first obtain the latest SDK version.
Copy
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>alibabacloud-aimiaobi20230801</artifactId>
<version>1.0.81</version>
</dependency>
- You can import other third-party dependencies.
Copy
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
</dependency>
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
<version>2.0.21</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.8.1</version>
</dependency>
News topic clustering
This feature groups a batch of content into different topics based on semantics.
Copy
package org.example.miaoce;
import com.alibaba.fastjson2.JSONObject;
import com.aliyun.auth.credentials.Credential;
import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
import com.aliyun.sdk.gateway.pop.Configuration;
import com.aliyun.sdk.gateway.pop.auth.SignatureVersion;
import com.aliyun.sdk.service.aimiaobi20230801.AsyncClient;
import com.aliyun.sdk.service.aimiaobi20230801.models.*;
import darabonba.core.client.ClientOverrideConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
@Slf4j
public class MiaoCeSubmitDocClusterTaskTest {
public static AsyncClient asyncClient() {
// The AccessKey ID.
String accessKeyId = System.getenv("accessKeyId");
// The AccessKey secret.
String accessKeySecret = System.getenv("accessKeySecret");
// The domain name, for example, aimiaobi.cn-beijing.aliyuncs.com.
String domain = System.getenv("domain");
return AsyncClient.builder().credentialsProvider(StaticCredentialProvider.create(Credential.builder()
.accessKeyId(accessKeyId).accessKeySecret(accessKeySecret).build())).serviceConfiguration(Configuration.create().setSignatureVersion(SignatureVersion.V3)).overrideConfiguration(ClientOverrideConfiguration.create().setProtocol("HTTPS")
.setEndpointOverride(domain)).build();
}
/**
* Submits a document clustering task.
*/
@Test
public void testDocClusterTaskTest() throws ExecutionException, InterruptedException, IOException {
String agentKey = System.getenv("AgentKey");
List<SubmitDocClusterTaskRequest.Documents> documentList = buildDocuments();
// Build the request object.
AsyncClient asyncClient = asyncClient();
// Submit the document clustering task.
SubmitDocClusterTaskResponse response = asyncClient.submitDocClusterTask(SubmitDocClusterTaskRequest.builder().agentKey(agentKey).documents(documentList).build()).get();
SubmitDocClusterTaskResponseBody.Data data = response.getBody().getData();
log.info("response: {}", JSONObject.toJSONString(response));
// Obtain the task ID.
String taskId = data.getTaskId();
// Poll the task status until it is no longer RUNNING or PENDING.
GetDocClusterTaskResponse response1;
while (true) {
response1 = asyncClient.getDocClusterTask(GetDocClusterTaskRequest.builder().agentKey(agentKey).taskId(taskId).build()).get();
log.info("response1: {}", JSONObject.toJSONString(response1));
// Continue polling if the status is RUNNING or PENDING.
if ("RUNNING".equals(response1.getBody().getData().getStatus()) || "PENDING".equals(response1.getBody().getData().getStatus())) {
Thread.sleep(1000);
} else {
break;
}
}
if (response1.getStatusCode() == 200) {
// Obtain the clustering results.
for (GetDocClusterTaskResponseBody.Topics topic : response1.getBody().getData().getTopics()) {
log.info("topic: {}", JSONObject.toJSONString(topic));
}
}
}
private static List<SubmitDocClusterTaskRequest.Documents> buildDocuments() throws IOException {
List<String> contents = new ArrayList<>();
contents.add("As one of the world's top exhibitions, the Internationale Funkausstellung Berlin (IFA) is not just a showcase for manufacturers and a window for consumers to learn about new products. It is also a barometer for the entire industry's development.\\nThe Leikeji reporting team has flown to Berlin, Germany, to discover the latest trends from various manufacturers. Leikeji found that at this year's IFA, home appliance companies from countries such as China, Germany, Japan, and Türkiye are all emphasizing the energy-saving features of their products and smart home solutions, almost turning the consumer electronics show into an 'energy-saving product exhibition'. The dazzling array of exhibits and the energy-saving solutions showcased by major companies brought IFA 2024 to a climax.\\n100 years ago, when IFA was first established, electricity-powered devices were gradually becoming popular. 100 years later, electricity supports modern society, but we have begun to think about how to save energy, reduce emissions, and decrease our use of electrical energy. At this IFA, companies from all over the world showed off their research achievements in energy saving and emission reduction to consumers.\\n1. Changhong, Midea, and others go All For AI, using AI to help save energy and reduce emissions.\\nFrom AI In AI to All For AI, artificial intelligence is sweeping the globe and permeating every aspect of life. AI has clearly become a powerful aid in energy saving and emission reduction.\\nMidea exhibited its AI ECO smart energy-saving solution for the first time at IFA 2024. This solution can use a database of hundreds of billions of device operations, real-time weather data from the cloud, and electricity price information. Combined with an AI algorithm equipped with a new big data pre-learning model, it analyzes information such as environment and materials in real time to make smart decisions and precisely control device energy consumption. This can effectively reduce home appliance energy consumption by 30%.\\n(Image source: Leikeji)\\nChanghong launched the 'Changhong Meiling Zhihuijia AI large model'. Based on 8 billion parameters, it adds 'thinking' capabilities to Changhong's refrigerators, washing machines, air conditioners, and other devices. Taking washing machines as an example, Changhong's products can provide different washing and drying solutions based on the material and condition of the clothes. This not only ensures that clothes are clean, hygienic, and undamaged, but also effectively reduces energy consumption.\\n(Image source: Leikeji)\\nOther companies such as TCL, Hisense, Haier, and Samsung have also made AI technology their core. They have paired it with perception and decision-making systems to customize smart energy consumption solutions and have launched multiple products with energy consumption below the A-level standard. The green home appliances displayed by Chinese companies at IFA 2024 not only save energy and reduce emissions but also better meet the needs of European consumers. They also demonstrate the technological strength of Chinese companies, which may mark the beginning of Chinese home appliance companies leading the global home appliance industry.\\n2. VESTEL and others' new concept: Whole-house energy saving is true energy saving.\\nSince the home appliance industry entered the era of intelligence, home appliances are no longer isolated. In response to consumer demand, while developing energy-saving technologies, home appliance companies have also begun to deploy whole-house energy-saving solutions.\\nAt IFA 2024, Midea exhibited a variety of home appliance products that support the AI ECO smart energy-saving solution, including refrigerators, washing machines, and water heaters. TCL, Hisense, Haier, and other companies did the same. These companies' energy-saving and emission-reduction plans are not limited to 'saving electricity'. They also try to use recyclable materials, especially plastics, to reduce their dependence on fossil fuels.\\n(Image source: Leikeji)\\nVESTEL, a Turkish brand and one of Europe's top three TV manufacturers, not only released the new 65-inch Revolutionary Energy-Saving TV, which can increase brightness by 60% without changing energy consumption, but also announced a whole-house energy-saving solution. All types of equipment, including batteries, air conditioners, and washing machines, are designed to be quiet and have low power consumption.\\n(Image source: Leikeji)\\nCurrently, most whole-house energy-saving solutions rely on AI technology because there is a lack of interaction between devices. The triple-supply system, which uses heat pump technology, is an effective solution for reducing energy consumption and improving energy utilization efficiency. At this IFA, TCL exhibited the R290 triple-supply air conditioner, which integrates heating, cooling, and domestic hot water functions. It uses the heat 'moved' during air conditioning refrigeration to heat domestic water, saving the cost of boiling water.\\n(Image source: Leikeji)\\nFrom triple-supply to AI energy saving, domestic and foreign companies are all focusing on 'green home appliances'. It is not an exaggeration to consider IFA 2024 an 'energy-saving technology exhibition'. One of the key reasons why companies at IFA 2024 are focusing on energy saving and emission reduction is perhaps that whether they are local European home appliance companies or companies from other regions of the world, energy saving is a problem that must be faced to develop in the European market.\\nEnergy saving and emission reduction is a global issue, but Europe is undoubtedly the main promoter. Greta Thunberg, a Swedish environmental activist born in the 2000s, was even selected for Time magazine's '100 most influential people in the world'. After visiting Europe, I believe there are three main reasons why Europeans attach importance to energy saving and emission reduction.\\nFirst, the concept of green consumption is deeply rooted in Europe. The bustling crowds of foreigners at the IFA booths showed great interest in the products exhibited by home appliance companies. This attitude towards energy saving and emission reduction provides fertile ground for the development of green home appliances in Europe.\\n(Image source: Leikeji)\\nFaced with the new thing of electric vehicles, several European countries have been the first to announce timetables for banning the sale of fuel vehicles. Some car companies have also successively announced the discontinuation of production and sales of fuel vehicles. To further ensure the environmental friendliness of new energy vehicles, Europe also requires car companies to strengthen battery recycling management.\\nThe EU reached its carbon peak as early as the 1990s, and now carbon emissions are on a downward trend. In the first quarter of this year, EU greenhouse gas emissions were about 894 million tons, a year-on-year decrease of 4%.\\nSecond, Europe is facing an energy crisis. Currently, the oil, natural gas, and other energy sources used by European consumers rely on imports. If there is a problem with the import channels, they may face insufficient energy reserves. After the Nord Stream pipeline rupture in September 2022, a natural gas crisis immediately broke out in Europe.\\nAfter the energy crisis broke out, several EU countries introduced electricity rationing measures, which brought a lot of inconvenience to the lives of local residents. In winter, some European residents had to cut down trees and burn wood for heating.\\nFinally, electricity bills in Europe are too expensive. Being in Berlin, Germany, I personally felt how important air conditioning is. Many hotels in Europe do not have air conditioning at all. Some hotels have air conditioning but are reluctant to turn it up high. Even the subway feels stuffy and hot. Although Germany has a temperate maritime climate and the temperature is relatively not that high, it still feels stuffy and hot in summer.\\n(Image source: Leikeji)\\nAfter asking local residents, I learned that it was because the local electricity bills were too high. Not only are individuals reluctant to use electricity, but some companies are also 'stingy' with their electricity use.\\nIn 2023, the average electricity price in Germany was about 0.45 euros/kWh (about 3.54 CNY/kWh), while the median monthly income was only 3,796 euros. Coupled with rent, food, and other living costs, it is no wonder that many Europeans are unwilling to install air conditioners and are reluctant to use them.\\nSome time ago, the Paris Olympics made headlines because the Olympic Village did not have air conditioning installed. The problem of excessively expensive electricity bills has also affected the development of the new energy vehicle industry in Europe. We buy new energy vehicles because home electricity is only about 0.5 CNY/kWh, and charging stations are generally about 1.5 CNY/kWh, which is much lower than the travel cost of fuel vehicles. The current oil price in Germany is about 1.75 euros/L (about 13.76 CNY/L), so electric vehicles have no travel cost advantage.\\n(Image source: Leikeji)\\nDue to the above factors, European consumers have a higher demand for low-energy-consumption home appliances than domestic consumers. At IFA 2024, major companies showcased their energy-saving and emission-reduction solutions. While moving towards a green lifestyle, they are also deeply deploying in the European market, conquering local consumers with their technological strength.\\nThe exploration of energy-saving directions for home appliance products has been going on for a long time. The addition of AI technology has brought home appliance energy-saving solutions to a new height. However, IFA 2024 is just the beginning of a new stage for home appliance companies to explore energy-saving solutions. The journey of energy saving and emission reduction will continue to climb to higher peaks with the support of more new technologies.\\nUsing AI perception and decision-making to intelligently adjust the working status of equipment, thereby reducing the power consumption of home appliances, was the unanimous choice of home appliance companies at this IFA. But for the overall direction of energy saving and emission reduction for the entire home appliance industry, AI can only play a partial role. How to improve energy utilization efficiency is equally important.\\nA TCL air conditioner engineer told me that the 'triple-supply' system, which domestic consumers don't care much about, is very popular in Europe. Many people give priority to triple-supply air conditioners when buying air conditioners. Using the waste heat from the air conditioner to preheat domestic water can save a lot of electricity bills. I think the reason may be that electricity is cheaper in China, so the demand for heat pumps is not that high.\\n(Image source: Leikeji)\\nHowever, various heat pump technologies are also developing rapidly in China. In addition to triple-supply air conditioners, other appliances such as water heaters and washing machines have also incorporated heat pump technology. They can use the waste heat generated by the appliance and the heat in the air to heat water or dry clothes.\\nIn addition, domestic manufacturers are also trying to solve the problem of household electricity consumption through photovoltaic technology. For example, the smart home solution jointly created by TCL Zhonghuan and TCL Photovoltaic Technology integrates photovoltaic power generation equipment, energy storage systems, heat pumps, electric vehicle charging piles, and home appliances. It has created an integrated management system that can store photovoltaic power to achieve energy saving and emission reduction effects.\\nChina is the world's largest country in the photovoltaic industry. Companies such as TCL and Gree are combining home appliances with photovoltaic equipment to alleviate the pressure on the power grid and reduce users' electricity expenses. Even when the house is unoccupied, the photovoltaic equipment can generate electricity and sell it to the grid, helping users 'earn extra money'.\\nEnergy is not infinite. Energy saving and emission reduction may be an eternal topic for human society in the future. Domestic and foreign companies are exploring the path of energy saving and emission reduction step by step. European regions, which are home to many developed countries, have a high economic level. Coupled with expensive basic electricity prices, the acceptance of energy-saving home appliances is currently high.\\nAt IFA 2024, the products exhibited by major home appliance companies pointed out the development trend and route of energy-saving and emission-reduction technologies. AI, triple-supply, photovoltaics, and other technologies will become the three mainstream solutions for reducing user costs and grid pressure. I believe that other companies that have not yet joined the energy-saving and emission-reduction camp will also step up their research and development of AI and triple-supply technologies, committed to increasing the penetration rate of green home appliances and contributing to global energy saving and emission reduction.");
contents.add("By Zhou Wenmeng, Sina Technology. 'Half of the companies at this year's IFA are from China.' This was the sentiment of a German-Chinese visitor after attending the 2024 IFA Berlin consumer electronics show. This statement is no exaggeration. Far away in Germany, the 2024 IFA Berlin (IFA 2024) is officially underway, with home appliance and consumer electronics companies from China, Europe, America, Japan, and South Korea attending the century-old exhibition. As a media outlet also present at the IFA, Sina Technology walked through the entire IFA exhibition hall and found that in 2024, in addition to established home appliance companies like Midea, Haier, TCL, Skyworth, Changhong, and Hisense, emerging home appliance brands including Dreame, Roborock, Laifen, and SKG, along with consumer hardware brands like DJI, Honor, and XGIMI, were all in attendance, occupying nearly half of the booths in the main exhibition halls. With the slowdown in growth and increasingly fierce homogeneous competition in the domestic home appliance and consumer electronics industry, going global has become a common choice for domestic companies. In this process, the competitive advantages brought by the supply chain and emerging technologies such as artificial intelligence are helping more and more domestic companies go global. Chinese manufacturers 'flex their muscles'. This year marks the 100th anniversary of the IFA exhibition and is also the first year that TCL has exclusively booked a hall to showcase its own and its upstream and downstream collaborative innovation achievements. Entering from the north gate of the IFA exhibition, turning right and crossing Hall 20, which is composed of many small and medium-sized foreign companies, you will immediately see Hall 21, which is exclusively booked by TCL. At this year's IFA, TCL showcased its smart terminals, semiconductor displays, and new energy photovoltaics through its two main entities, TCL Industrial and TCL Technology. It brought terminal products such as the 10,000-zone QD-Mini LED TV X11H and the so-called world's largest 115-inch QD-Mini LED TV X955 Max. It also released a 105-inch high-refresh-rate curved gaming monitor and exhibited a 57-inch 8K curved MLED gaming monitor. According to TCL staff, TCL has established 46 R&D centers and 33 manufacturing bases worldwide, with business covering more than 160 countries and regions. In the past five years, its overseas revenue has grown from 59 billion CNY to 125.28 billion CNY. Crossing the TCL exhibition hall into Hall 22, the first thing that comes into view is Changhong Electric. This year, Changhong exhibited its full range of AI home appliances and also released the Canghai agent AI TV and the Changhong Meiling Zhihuijia AI large model. It is reported that the Canghai agent AI TV can communicate, think, and grow. The Changhong Meiling Zhihuijia AI large model has a parameter scale of 8 billion and can embed the large model into refrigerators, washing machines, dryers, and air conditioners. Entering Hall 23, which is jointly contracted by Hisense and Skyworth, Hisense exhibited the official custom TV for 'Black Myth: Wukong', showcasing the high image quality of the large-scale domestic 3A game, making details such as the wrinkles on Wukong's clothes and the patterns on his golden-hooped staff vividly visible. After passing through the small exhibition hall after Hall 23, you will arrive at Hall 5-1, which is contracted by Midea Group. At this year's IFA, Midea exhibited its household air conditioners, kitchen appliances, laundry care products, and more. It also showcased its AI ECO smart energy-saving solution for the first time. This solution is equipped with an AI energy-saving algorithm with a big data pre-learning model, which can intelligently analyze, predict, and make comprehensive smart decisions and precise energy-saving controls for various conditions such as environment and materials, reducing the average energy consumption of home appliances by 30%. 'Europe has four distinct seasons and a high degree of electrification, with a large demand for electricity. Now that European energy prices are rising, the cost of electricity for local residents is extremely high. Using technology to improve energy efficiency is a market demand and also our commitment to global green, low-carbon, and sustainable development,' a Midea international business smart product staff member told Sina Technology. In addition, in Hall 3-1 and Hall 6-2, domestic exhibitors represented by Haier and Honor also occupied more than half of the halls. In Hall 9, emerging home appliance companies represented by Ecovacs, Roborock, Dreame Technology, and Laifen occupied most of the hall, almost jointly contracting the entire hall. In addition, emerging technology companies such as DJI, XGIMI, and SKG also appeared in different locations in the exhibition hall, continuously expanding the lineup of Chinese companies at the IFA. 'Passive deployment, to avoid being left behind'. Behind the fact that nearly half of the exhibition halls are contracted by Chinese companies, finding new performance growth points in the global market is becoming a mandatory question for more and more Chinese home appliance and consumer electronics companies. In a conversation with Sina Technology, Li Yongping, General Manager of TCL Industrial's European Marketing Department, said frankly, 'In recent years, the domestic market has been very competitive, so many brands or companies want to find new growth points overseas. Although the entire European market has been under pressure in the past few years, and the speed of new demand updates is relatively not as fast as other markets, the overall consumer volume in Europe is large, and the consumption structure is high. If we can achieve better value-added or differentiation in brand and product services, the value space we can obtain will be higher. Therefore, while achieving a relatively large scale in Europe, it will also bring better profit value.' The person in charge of Midea's international business intelligent system also told Sina Technology, 'Midea has been deploying globalization for many years, and globalization has long been an inseparable part. The market share in overseas markets such as Europe is large enough, and there is enough space. In these markets, by combining the company's long-term technology accumulation and supply chain advantages, and developing products that meet the local market, we can achieve rapid growth.' With the development of Chinese companies' globalization, the concept of intelligent products such as artificial intelligence technology, which is constantly mentioned in China, is being displayed to the outside world through IFA as companies continue to practice. In the exhibition halls of Midea, Haier, TCL, Hisense, and Honor, words related to artificial intelligence technology are constantly flashing. But for the European market, where data privacy protection is strict and most restaurants still use manual ordering, consumers' embrace of this technology is not as high as imagined. 'This market requires high investment and long-term persistence. You have to burn a lot of money to make products, and at the same time, you have to invest a lot of money in branding. People have a very high degree of trust in established brands and are not easy to accept new products. The acceptance of technologies such as artificial intelligence is not very high either. At present, companies' deployment of AI here is more for strategic purposes, a passive deployment to avoid being easily left behind,' a business leader of a home appliance giant told Sina Technology. Behind the massive push to go global, the layout of domestic companies in the global market is also facing new challenges due to regional cultural and consumer demand differences. Editor: Jiang Yuhan ");
contents.add("In early September, my work schedule was particularly busy.\\nAlthough the weather in Berlin was nice, I didn't have much leisure time to appreciate it. After a simple wash-up and a quick taste of the hotel breakfast that I wasn't quite used to, it was time to head to the Messe Berlin exhibition center.\\nGood morning, everyone, and welcome to the second day of IFA 2024 (2024 Internationale Funkausstellung Berlin).\\nBorn in 1924, IFA (Internationale Funkausstellung Berlin, formerly the Berlin International Radio Show) has a history of 100 years. As one of the world's three major consumer electronics shows, and more importantly, the only large-scale consumer electronics show in the second half of the year, it naturally attracts high attention from all over the world.\\n(Image source: Leikeji)\\nUnlike the dazzling technologies displayed at CES, and different from the technology releases for operators and ISPs at MWC, many of the technologies and products exhibited at IFA can actually be bought and used in the near future. This 'pragmatic' feature, in my opinion, is one of the important reasons why IFA has been able to continue from 1924 to the present day.\\nSo today, it's time to turn our attention back to the protagonist of IFA—white goods.\\nChinese White Goods Shine at IFA\\nI have to say, the number of Chinese brands appearing at the IFA show far exceeded my expectations.\\nUnlike CES and MWC, where you have to dig through many startups to find Chinese brands, Chinese brands are almost everywhere at IFA.\\nHaier: From Products to Scenarios\\nAt the entrance of the Haier Smart Home exhibition area, in the most prominent position, are Haier's refrigerators and washing machine products.\\nStepping into the Haier Smart Home exhibition area, many European buyers and retailers were heading for the Cube 90 series refrigerators. This smart refrigerator, equipped with 'full-space preservation technology', just shined at the Milan International Kitchen Exhibition. Through independent dry and wet zones, it separates the storage areas for fruits, vegetables, and dry goods with different suitable humidity levels, which can extend the preservation time of fruits and vegetables in the wet drawer by 2 times.\\nInnovative technologies like this are not uncommon in the Haier Smart Home exhibition area. For example, the Haier Langjing X11 demonstrated its original wind cruise technology, which can completely replace the air in the drum in 2 minutes. The Haier Wine Bank 60 Series 7, equipped with a natural wind circulation system, reproduces the conditions of a real wine cellar and can store red wine, white wine, and champagne at the same time, which is very interesting.\\n(Image source: Leikeji)\\nChinese brands, represented by Haier, have shown the world the charm of 'Created in China'.\\nAnd this charm is not only reflected in outstanding individual products but also in the smart ecological scenarios that Haier Smart Home has been committed to achieving.\\nHaier Smart Home's ecosystem launched in Europe—hOn—can manage interconnected products and smart scenarios of the three major brands Haier, Candy, and Hoover at the same time. It also integrates AI, machine learning technology, and smart sensors to create diverse home scenarios that meet the individual needs of users.\\n(Image source: Leikeji)\\nIn the smart kitchen scenario, every kitchen appliance is an indispensable part of the entire kitchen ecosystem. The refrigerator can link with the oven for one-key baking. The range hood can sense the power of the stove and automatically adjust the air volume. The oven, after being intelligently interconnected through bionic smart technology, can recommend recipes to users. Based on the direction of intelligent development and the most advanced bionic smart technology, creating smart scenario solutions that meet the individual needs of users is perhaps the future that Haier Smart Home wants to achieve.\\nSamsung: Bringing Advanced Energy-Saving Experience\\nFor an international giant like Samsung Electronics, IFA 2024 is indeed a good opportunity for display.\\nSo they not only booked an entire exhibition hall but also specially exhibited a new series of energy-saving home appliances designed for the European lifestyle—the Samsung Bespoke AI™ washing machine with A-55% extra energy efficiency, the Bespoke AI™ washer-dryer that achieves A-level energy efficiency for the entire washing and drying process, and the Bespoke dishwasher with A-10% energy efficiency.\\n(Image source: Samsung)\\nThat's right, this time Samsung is playing the energy-saving card.\\nThe most exaggerated of these three products is the Samsung Bespoke AI™ washing machine. With the new BubbleShot technology, it uses a circulation pump to draw out detergent and water and spray it onto the clothes in the drum. The theoretical energy consumption of this product is 55% lower than the minimum requirement of the European A-level energy efficiency rating, and the washing effect has also been significantly improved.\\nHowever, this model is planned to be released next year, so it seems that European users will not be able to use it this year.\\nThere is also the new Samsung Bespoke AI Hybrid refrigerator, which uses a hybrid cooling technology of a compressor and a Peltier element. It allows the refrigerator to make intelligent adjustments to save energy when energy consumption exceeds daily usage. For example, when the refrigerator door is open for a long time, the low-energy-consumption Peltier cooling technology can serve as an additional cooling source to improve overall energy efficiency.\\nIn a sense, this may also be a 'hybrid' home appliance.\\n(Image source: Leikeji)\\nAccording to the official statement, Samsung continues to prioritize energy efficiency in its products and is committed to achieving this goal with the help of AI technology. For example, by building AI functions into appliances such as refrigerators and washing machines, or using AI functions to unleash the potential of its SmartThings ecosystem to save more energy.\\nUnconsciously, AI has penetrated into all aspects of our lives.\\nMidea: Experiencing AI ECO Smart Energy Saving\\nIf you want to know what Midea's focus was at this exhibition, it must be the first-time display of the AI ECO smart energy-saving solution.\\nAccording to the official statement, this solution is based on a database of hundreds of billions of device operations and third-party data such as real-time weather and electricity prices obtained through cloud connections. It uses an AI energy-saving algorithm equipped with a new big data pre-learning model to effectively analyze, predict, and make comprehensive smart decisions and precise energy-saving controls for various conditions such as environment and materials, reducing the average energy consumption of home appliances by a large margin of 30%.\\n(Image source: Leikeji)\\nTake air conditioners as an example. As the outdoor environmental temperature and humidity change, traditional air conditioners, even when set to the same temperature, can hardly maintain a constant temperature for the user's perception. People's body temperature often feels uncomfortable due to sudden cold and heat. Especially at night, the continuous operation of the air conditioner may sometimes lead to an excessively low indoor temperature, affecting sleep quality. At the same time, frequent and repeated temperature adjustments will also increase the power consumption of the air conditioner.\\nAnd the air conditioner equipped with this solution can predict the change of indoor heat load and make precise temperature control in advance, achieving a major leap in energy use efficiency.\\nIn addition, a variety of home appliance products that support Midea's AI ECO smart energy-saving solution were also displayed in the center of the Midea booth, including refrigerators, washing machines, and water heaters.\\n(Image source: Leikeji)\\nAccording to the abnormal power consumption that may occur during the use of different products, Midea adopts a fully customized AI ECO algorithm, which is like an invisible smart energy manager, providing comprehensive energy-saving solutions for various scenarios in daily family life.\\nThrough diverse green home appliance product solutions, Midea has demonstrated its sustainable development philosophy and green transformation determination to actively participate in and lead the industry.\\nThis is indeed a good match for the current energy-scarce European market.\\nChanghong: First to Release a White Goods Vertical Large Model\\nIf someone had told you half a year ago that refrigerators and washing machines would also use AI in the future, I think most people would not have believed it.\\nBut at the IFA 2024 exhibition, Changhong really released the industry's first white goods vertical large model—the Changhong Meiling Zhihuijia AI large model.\\n(Image source: Leikeji)\\nAccording to the official introduction, the Changhong Meiling Zhihuijia AI large model has a parameter scale of 8 billion and can be embedded in home appliances such as refrigerators, washing machines, dryers, and air conditioners, giving them the ability to 'think'.\\nIn a real-world scenario, this large model can understand user needs, predict user preferences, and provide more precise services. For example, the AI clean clothes technology provides users with the best washing and drying solutions based on the material and condition of the clothes. The AI fresh freezing technology provides users with the best preservation environment and exclusive healthy recipes based on the characteristics of the ingredients. This is to create AI home appliances that are suitable for each user's own living habits.\\nIn my opinion, the AI large model technology released by Changhong this time will promote Changhong's in-depth exploration of smart technology. It not only brings technological progress but will also further change the smart home ecosystem in the future.\\nTCL: When AI and Pragmatism Merge\\nSince I'm already here, I definitely have to go see TCL Industrial's exhibition area.\\nI have to say, although TCL is famous for its excellent TV products, their air conditioners, refrigerators, and washing machines are equally impressive.\\nLet's first talk about the TCL FreshIN 3.0 air conditioner I saw. This model uses a patented design of a liftable fresh air inlet 'FreshIN', which can notify the user when fresh air enters the room. Paired with the industry-leading TVOC detection system, it allows users to monitor the air quality at a glance. Combined with the super power-saving AI big data model algorithm, it can intelligently sense changes in environmental temperature, precisely regulate the operating frequency, and achieve an energy-saving rate of up to 40%.\\n(Image source: Leikeji)\\nTCL also exhibited its proud ultra-thin flat-embedded series of refrigerators. The 1 mm seamless embedded design can perfectly match traditional 600 mm cabinets. The T-Fresh system in the refrigerator compartment can kill 99.99% of bacteria within 48 hours, extending the preservation period of food. The use of fourth-generation microporous foaming technology and vacuum insulation materials gives the refrigerator a larger storage space.\\nIt is not difficult to see that while actively embracing AI technology, TCL also attaches great importance to the core functions and design of the home appliances themselves, striving to solve practical problems for users and bring a more convenient life experience.\\nIf the current momentum continues, TCL's white goods business is rapidly joining the top ranks.\\nHisense: Accelerating Scenario-based Upgrades\\nAt last year's IFA, Hisense announced its future technology strategy for the first time: to create the future with scenarios.\\nAt this year's IFA, Hisense went a step further, launching the implementation of scenario-based upgrades, shifting from providing single products to providing scenario solutions, and providing three main scenarios for white goods products: smart laundry, smart kitchen, and smart air care.\\nThe Hisense Series 7i washing machine series simplifies the laundry care process through remote monitoring and automatic adjustment functions. The Hisense smart large-screen refrigerator allows users to apply remote temperature settings and activate the energy-saving mode with one key through the AI Eco function. Hisense's Energy Pro X air conditioner series provides real-time monitoring of indoor air quality, allowing users to make adjustments remotely as needed.\\n(Image source: Leikeji)\\nThese products not only improve the intelligence level of home appliances but also provide users with a more intuitive and convenient smart life experience.\\nIn addition to products, Hisense also displayed environmentally friendly materials such as renewable materials, non-petroleum-based materials, and coffee grounds materials applied to the entire home appliance.\\nAccording to the on-site staff, the Hisense refrigerator R&D team, after long-term technical research, has created an industry precedent for the application of bio-based material products. The proportion of recycled materials used in refrigerator products can reach more than 40%, and the recyclability rate exceeds 80%.\\nIt is not difficult to see that Hisense is conceiving a smart, green, and healthy future living space.\\nHigh-end Intelligence is Needed, but Green Energy Saving is More Important\\nI have to say, this AI wind that has swept the entire consumer market really seems to be blowing towards the white goods market.\\nMidea uses an AI energy-saving algorithm equipped with a big data pre-learning model to create an AI ECO smart energy-saving solution that conforms to its own core philosophy. Changhong is more groundbreaking, bringing the industry's first white goods vertical large model—the Changhong Meiling Zhihuijia AI large model, hoping to use it to understand user needs, predict user preferences, and provide more precise services.\\n(Image source: Leikeji)\\nAs for 'All in AI' Samsung, it also launched the Bespoke series of smart home appliances with an upgraded Bixby voice assistant function at the exhibition. The upgraded Bixby can understand multiple commands in a user's conversation and execute continuous commands in combination with the previous context. For example, users can start the washing machine, adjust the air conditioner temperature, or check the food inventory in the refrigerator through voice commands, and get recommendations for healthier recipes.\\nThese smart home appliances not only improve the user's quality of life but also demonstrate the broad application prospects of AI technology in the home appliance field.\\nHowever, under the surface of AI technology, what each manufacturer is actually pursuing is more basic pragmatism.\\nTo put it this way, because white goods are products that are closer to daily life, it is difficult to see AIGC functions emphasized on white goods like those on mobile phones, computers, and TVs.\\nInstead, there are a series of relatively clear practical functions, such as 'using AI to identify fabrics and intelligently match washing algorithms' or 'using AI to identify the current scene and control the air conditioner's airflow', all of which are enhancements to the core functions of the product.\\n(Image source: Leikeji)\\nSpecifically in terms of selling points, on products like refrigerators, thin-embedded design and preservation technology are obviously more popular. On washing machines and dryers, the problem to be solved is 'how to wash clothes thoroughly'. And on air conditioners, the key questions become whether it is power-saving, how the fresh air system experience is, and 'can it let me enter a delicate sleep'.\\nInterestingly, at this year's booths, there was a scene where almost every manufacturer was emphasizing their use of AI capabilities to achieve energy-saving effects.\\n(Image source: Leikeji)\\nAnd the deep-seated reason for this situation is the long-standing energy crisis problem in Europe.\\nIn recent years, sudden geopolitical events have had a major impact on the entire European energy market. The supply cutoff from the once-largest natural gas and oil supplier, coupled with the maintenance and shutdown of many nuclear power plants due to left-wing protests, has led to a serious energy crisis in Europe.\\nTo cope with this challenge, European countries and the EU have taken a series of measures. From March 1, 2021, the EU's energy efficiency label ratings have been adjusted. A+++ rated products under the old energy efficiency standard are basically in the A to C range after being converted to the new energy efficiency rating. The new energy efficiency rating division is obviously stricter.\\nBut on this basis, domestic manufacturers such as Haier, Midea, TCL, and Changhong have all launched a number of products at IFA that are more energy-efficient than the European A-level energy standard.\\nThese energy-saving home appliances not only help reduce energy consumption but also help consumers save on electricity bills, which is in line with the European market's demand for sustainable development. Most importantly, they show the world China's outstanding achievements in the field of energy saving. 'Green energy saving' may become another key for domestic home appliances to lead the overseas market.\\nIn Conclusion\\nAt IFA 2024, I saw the latest trends in the white goods market. The application of AI technology, the return of pragmatism, and the emphasis on energy saving and environmental protection have clearly become the main development directions of the future global market.\\nIn my opinion, as the first stop for domestic enterprises to contact the European market, IFA is not only an opportunity to display new products and technologies but also a key channel to deeply understand the needs of European consumers and market dynamics.\\n(Image source: Leikeji)\\nWith the improvement of the global influence of Chinese brands, more and more enterprises are showing strong innovation to the world, highlighting the leading position of Chinese brands in the global market, and further enhancing the international market's recognition and trust in Chinese brands.\\nIf the century-long history of IFA is a vivid portrayal of Chinese brands going to the world and influencing the world.\\nThen in the next century, I hope that domestic enterprises can continue to play an important role in the global technological wave, promote technological progress and market development, continue to innovate products and technological applications, bring more high-quality products and services to global consumers, and create a better life for more global users.");
contents.add("In early September, my work schedule was particularly busy.\\nAlthough the weather in Berlin was nice, I didn't have much leisure time to appreciate it. After a simple wash-up and a quick taste of the hotel breakfast that I wasn't quite used to, it was time to head to the Messe Berlin exhibition center.\\nGood morning, everyone, and welcome to the second day of IFA 2024 (2024 Internationale Funkausstellung Berlin).\\nBorn in 1924, IFA (Internationale Funkausstellung Berlin, formerly the Berlin International Radio Show) has a history of 100 years. As one of the world's three major consumer electronics shows, and more importantly, the only large-scale consumer electronics show in the second half of the year, it naturally attracts high attention from all over the world.\\n\\n(Image source: Leikeji)\\nUnlike the dazzling technologies displayed at CES, and different from the technology releases for operators and ISPs at MWC, many of the technologies and products exhibited at IFA can actually be bought and used in the near future. This 'pragmatic' feature, in my opinion, is one of the important reasons why IFA has been able to continue from 1924 to the present day.\\nSo today, it's time to turn our attention back to the protagonist of IFA—white goods.\\nChinese White Goods Shine at IFA\\nI have to say, the number of Chinese brands appearing at the IFA show far exceeded my expectations.\\nUnlike CES and MWC, where you have to dig through many startups to find Chinese brands, Chinese brands are almost everywhere at IFA.\\nHaier: From Products to Scenarios\\nAt the entrance of the Haier Smart Home exhibition area, in the most prominent position, are Haier's refrigerators and washing machine products.\\nStepping into the Haier Smart Home exhibition area, many European buyers and retailers were heading for the Cube 90 series refrigerators. This smart refrigerator, equipped with 'full-space preservation technology', just shined at the Milan International Kitchen Exhibition. Through independent dry and wet zones, it separates the storage areas for fruits, vegetables, and dry goods with different suitable humidity levels, which can extend the preservation time of fruits and vegetables in the wet drawer by 2 times.\\nInnovative technologies like this are not uncommon in the Haier Smart Home exhibition area. For example, the Haier Langjing X11 demonstrated its original wind cruise technology, which can completely replace the air in the drum in 2 minutes. The Haier Wine Bank 60 Series 7, equipped with a natural wind circulation system, reproduces the conditions of a real wine cellar and can store red wine, white wine, and champagne at the same time, which is very interesting.\\n\\n(Image source: Leikeji)\\nChinese brands, represented by Haier, have shown the world the charm of 'Created in China'.\\nAnd this charm is not only reflected in outstanding individual products but also in the smart ecological scenarios that Haier Smart Home has been committed to achieving.\\nHaier Smart Home's ecosystem launched in Europe—hOn—can manage interconnected products and smart scenarios of the three major brands Haier, Candy, and Hoover at the same time. It also integrates AI, machine learning technology, and smart sensors to create diverse home scenarios that meet the individual needs of users.\\n\\n(Image source: Leikeji)\\nIn the smart kitchen scenario, every kitchen appliance is an indispensable part of the entire kitchen ecosystem. The refrigerator can link with the oven for one-key baking. The range hood can sense the power of the stove and automatically adjust the air volume. The oven, after being intelligently interconnected through bionic smart technology, can recommend recipes to users.\\nBased on the direction of intelligent development and the most advanced bionic smart technology, creating smart scenario solutions that meet the individual needs of users is perhaps the future that Haier Smart Home wants to achieve.\\nSamsung: Bringing Advanced Energy-Saving Experience\\nFor an international giant like Samsung Electronics, IFA 2024 is indeed a good opportunity for display.\\nSo they not only booked an entire exhibition hall but also specially exhibited a new series of energy-saving home appliances designed for the European lifestyle—the Samsung Bespoke AI™ washing machine with A-55% extra energy efficiency, the Bespoke AI™ washer-dryer that achieves A-level energy efficiency for the entire washing and drying process, and the Bespoke dishwasher with A-10% energy efficiency.\\n\\n(Image source: Samsung)\\nThat's right, this time Samsung is playing the energy-saving card.\\nThe most exaggerated of these three products is the Samsung Bespoke AI™ washing machine. With the new Bubble Shot technology, it uses a circulation pump to draw out detergent and water and spray it onto the clothes in the drum. The theoretical energy consumption of this product is 55% lower than the minimum requirement of the European A-level energy efficiency rating, and the washing effect has also been significantly improved.\\nHowever, this model is planned to be released next year, so it seems that European users will not be able to use it this year.\\nThere is also the new Samsung Bespoke AI Hybrid refrigerator, which uses a hybrid cooling technology of a compressor and a Peltier element. It allows the refrigerator to make intelligent adjustments to save energy when energy consumption exceeds daily usage. For example, when the refrigerator door is open for a long time, the low-energy-consumption Peltier cooling technology can serve as an additional cooling source to improve overall energy efficiency.\\nIn a sense, this may also be a 'hybrid' home appliance.\\n\\n(Image source: Leikeji)\\nAccording to the official statement, Samsung continues to prioritize energy efficiency in its products and is committed to achieving this goal with the help of AI technology. For example, by building AI functions into appliances such as refrigerators and washing machines, or using AI functions to unleash the potential of its SmartThings ecosystem to save more energy.\\nUnconsciously, AI has penetrated into all aspects of our lives.\\nMidea: Experiencing AI ECO Smart Energy Saving\\nIf you want to know what Midea's focus was at this exhibition, it must be the first-time display of the AI ECO smart energy-saving solution.\\nAccording to the official statement, this solution is based on a database of hundreds of billions of device operations and third-party data such as real-time weather and electricity prices obtained through cloud connections. It uses an AI energy-saving algorithm equipped with a new big data pre-learning model to effectively analyze, predict, and make comprehensive smart decisions and precise energy-saving controls for various conditions such as environment and materials, reducing the average energy consumption of home appliances by a large margin of 30%.\\n\\n(Image source: Leikeji)\\nTake air conditioners as an example. As the outdoor environmental temperature and humidity change, traditional air conditioners, even when set to the same temperature, can hardly maintain a constant temperature for the user's perception. People's body temperature often feels uncomfortable due to sudden cold and heat. Especially at night, the continuous operation of the air conditioner may sometimes lead to an excessively low indoor temperature, affecting sleep quality. At the same time, frequent and repeated temperature adjustments will also increase the power consumption of the air conditioner.\\nAnd the air conditioner equipped with this solution can predict the change of indoor heat load and make precise temperature control in advance, achieving a major leap in energy use efficiency.\\nIn addition, a variety of home appliance products that support Midea's AI ECO smart energy-saving solution were also displayed in the center of the Midea booth, including refrigerators, washing machines, and water heaters.\\n\\n(Image source: Leikeji)\\nAccording to the abnormal power consumption that may occur during the use of different products, Midea adopts a fully customized AI ECO algorithm, which is like an invisible smart energy manager, providing comprehensive energy-saving solutions for various scenarios in daily family life.\\nThrough diverse green home appliance product solutions, Midea has demonstrated its sustainable development philosophy and green transformation determination to actively participate in and lead the industry.\\nThis is indeed a good match for the current energy-scarce European market.\\nChanghong: First to Release a White Goods Vertical Large Model\\nIf someone had told you half a year ago that refrigerators and washing machines would also use AI in the future, I think most people would not have believed it.\\nBut at the IFA 2024 exhibition, Changhong really released the industry's first white goods vertical large model—the Changhong Meiling Zhihuijia AI large model.\\n\\n(Image source: Leikeji)\\nAccording to the official introduction, the Changhong Meiling Zhihuijia AI large model has a parameter scale of 8 billion and can be embedded in home appliances such as refrigerators, washing machines, dryers, and air conditioners, giving them the ability to 'think'.\\nIn a real-world scenario, this large model can understand user needs, predict user preferences, and provide more precise services. For example, the AI clean clothes technology provides users with the best washing and drying solutions based on the material and condition of the clothes. The AI fresh freezing technology provides users with the best preservation environment and exclusive healthy recipes based on the characteristics of the ingredients. This is to create AI home appliances that are suitable for each user's own living habits.\\nIn my opinion, the AI large model technology released by Changhong this time will promote Changhong's in-depth exploration of smart technology. It not only brings technological progress but will also further change the smart home ecosystem in the future.\\nTCL: When AI and Pragmatism Merge\\nSince I'm already here, I definitely have to go see TCL Industrial's exhibition area.\\nI have to say, although TCL is famous for its excellent TV products, their air conditioners, refrigerators, and washing machines are equally impressive.\\nLet's first talk about the TCL FreshIN 3.0 air conditioner I saw. This model uses a patented design of a liftable fresh air inlet 'FreshIN', which can notify the user when fresh air enters the room. Paired with the industry-leading TVOC detection system, it allows users to monitor the air quality at a glance. Combined with the super power-saving AI big data model algorithm, it can intelligently sense changes in environmental temperature, precisely regulate the operating frequency, and achieve an energy-saving rate of up to 40%.\\n\\n(Image source: Leikeji)\\nTCL also exhibited its proud ultra-thin flat-embedded series of refrigerators. The 1 mm seamless embedded design can perfectly match traditional 600 mm cabinets. The T-Fresh system in the refrigerator compartment can kill 99.99% of bacteria within 48 hours, extending the preservation period of food. The use of fourth-generation microporous foaming technology and vacuum insulation materials gives the refrigerator a larger storage space.\\nIt is not difficult to see that while actively embracing AI technology, TCL also attaches great importance to the core functions and design of the home appliances themselves, striving to solve practical problems for users and bring a more convenient life experience.\\nIf the current momentum continues, TCL's white goods business is rapidly joining the top ranks.\\nHisense: Accelerating Scenario-based Upgrades\\nAt last year's IFA, Hisense announced its future technology strategy for the first time: to create the future with scenarios.\\nAt this year's IFA, Hisense went a step further, launching the implementation of scenario-based upgrades, shifting from providing single products to providing scenario solutions, and providing three main scenarios for white goods products: smart laundry, smart kitchen, and smart air care.\\nThe Hisense Series 7i washing machine series simplifies the laundry care process through remote monitoring and automatic adjustment functions. The Hisense smart large-screen refrigerator allows users to apply remote temperature settings and activate the energy-saving mode with one key through the AI Eco function. Hisense's Energy Pro X air conditioner series provides real-time monitoring of indoor air quality, allowing users to make adjustments remotely as needed.\\n\\n(Image source: Leikeji)\\nThese products not only improve the intelligence level of home appliances but also provide users with a more intuitive and convenient smart life experience.\\nIn addition to products, Hisense also displayed environmentally friendly materials such as renewable materials, non-petroleum-based materials, and coffee grounds materials applied to the entire home appliance.\\nAccording to the on-site staff, the Hisense refrigerator R&D team, after long-term technical research, has created an industry precedent for the application of bio-based material products. The proportion of recycled materials used in refrigerator products can reach more than 40%, and the recyclability rate exceeds 80%.\\nIt is not difficult to see that Hisense is conceiving a smart, green, and healthy future living space.\\nHigh-end Intelligence is Needed, but Green Energy Saving is More Important\\nI have to say, this AI wind that has swept the entire consumer market really seems to be blowing towards the white goods market.\\nMidea uses an AI energy-saving algorithm equipped with a big data pre-learning model to create an AI ECO smart energy-saving solution that conforms to its own core philosophy. Changhong is more groundbreaking, bringing the industry's first white goods vertical large model—the Changhong Meiling Zhihuijia AI large model, hoping to use it to understand user needs, predict user preferences, and provide more precise services.\\n\\n(Image source: Leikeji)\\nAs for 'All in AI' Samsung, it also launched the Bespoke series of smart home appliances with an upgraded Bixby voice assistant function at the exhibition. The upgraded Bixby can understand multiple commands in a user's conversation and execute continuous commands in combination with the previous context. For example, users can start the washing machine, adjust the air conditioner temperature, or check the food inventory in the refrigerator through voice commands, and get recommendations for healthier recipes.\\nThese smart home appliances not only improve the user's quality of life but also demonstrate the broad application prospects of AI technology in the home appliance field.\\nHowever, under the surface of AI technology, what each manufacturer is actually pursuing is more basic pragmatism.\\nTo put it this way, because white goods are products that are closer to daily life, it is difficult to see AIGC functions emphasized on white goods like those on mobile phones, computers, and TVs.\\nInstead, there are a series of relatively clear practical functions, such as 'using AI to identify fabrics and intelligently match washing algorithms' or 'using AI to identify the current scene and control the air conditioner's airflow', all of which are enhancements to the core functions of the product.\\n\\n(Image source: Leikeji)\\nSpecifically in terms of selling points, on products like refrigerators, thin-embedded design and preservation technology are obviously more popular. On washing machines and dryers, the problem to be solved is 'how to wash clothes thoroughly'. And on air conditioners, the key questions become whether it is power-saving, how the fresh air system experience is, and 'can it let me enter a delicate sleep'.\\nInterestingly, at this year's booths, there was a scene where almost every manufacturer was emphasizing their use of AI capabilities to achieve energy-saving effects.\\n\\n(Image source: Leikeji)\\nAnd the deep-seated reason for this situation is the long-standing energy crisis problem in Europe.\\nIn recent years, sudden geopolitical events have had a major impact on the entire European energy market. The supply cutoff from the once-largest natural gas and oil supplier, coupled with the maintenance and shutdown of many nuclear power plants due to left-wing protests, has led to a serious energy crisis in Europe.\\nTo cope with this challenge, European countries and the EU have taken a series of measures. From March 1, 2021, the EU's energy efficiency label ratings have been adjusted. A+++ rated products under the old energy efficiency standard are basically in the A to C range after being converted to the new energy efficiency rating. The new energy efficiency rating division is obviously stricter.\\nBut on this basis, domestic manufacturers such as Haier, Midea, TCL, and Changhong have all launched a number of products at IFA that are more energy-efficient than the European A-level energy standard.\\nThese energy-saving home appliances not only help reduce energy consumption but also help consumers save on electricity bills, which is in line with the European market's demand for sustainable development. Most importantly, they show the world China's outstanding achievements in the field of energy saving. 'Green energy saving' may become another key for domestic home appliances to lead the overseas market.\\nIn Conclusion\\nAt IFA 2024, I saw the latest trends in the white goods market. The application of AI technology, the return of pragmatism, and the emphasis on energy saving and environmental protection have clearly become the main development directions of the future global market.\\nIn my opinion, as the first stop for domestic enterprises to contact the European market, IFA is not only an opportunity to display new products and technologies but also a key channel to deeply understand the needs of European consumers and market dynamics.\\n\\n(Image source: Leikeji)\\nWith the improvement of the global influence of Chinese brands, more and more enterprises are showing strong innovation to the world, highlighting the leading position of Chinese brands in the global market, and further enhancing the international market's recognition and trust in Chinese brands.\\nIf the century-long history of IFA is a vivid portrayal of Chinese brands going to the world and influencing the world.\\nThen in the next century, I hope that domestic enterprises can continue to play an important role in the global technological wave, promote technological progress and market development, continue to innovate products and technological applications, bring more high-quality products and services to global consumers, and create a better life for more global users.\\nEditor:");
contents.add("At 16:00 UTC+8 on September 6, as the only consumer electronics show in the second half of the year, the Internationale Funkausstellung Berlin (IFA 2024) officially opened at the Messe Berlin exhibition center for a five-day period (September 6-10).\\nTo bring you the latest developments in the technology industry for the second half of the year, the Leikeji reporting team has flown to Berlin, Germany, to discover the latest trends from various manufacturers.\\nIn the 100-year history of the IFA, it has undergone countless innovations and promoted the popularization of many key technologies, but its core theme has always remained unchanged: home appliances. German home appliances have always been on par with Chinese and Japanese appliances in the industry, including famous brands such as Siemens, Bosch, and Gaggenau. Now, as the scale of the exhibition continues to expand, IFA has become an excellent display platform for global home appliance brands.\\nThis year, in addition to TCL's Mini-LED large-screen solution, brands such as Hisense, Changhong, Samsung, and Haier also displayed their latest technologies and TV products. I have walked 40,000 steps in Berlin these past few days. Now, come with me to see what TV technologies and products were displayed at IFA 2024.\\nHeavyweight New Products Gather, TV Giants Flex Their Muscles\\n1. Changhong: Going all-in on AI, releasing the first 'Agent AI TV'\\nAmong the many TV brands, Changhong is undoubtedly the one that most prominently features the AI concept. Not only did it bring its latest full-range AI home appliances, but it also showed everyone Changhong's world's first Canghai agent AI TV.\\nIt is understood that the new Canghai agent AI TV can communicate, think, and grow. Compared with the 'Yunfan' large model, its technology and functions are more powerful. For example, Changhong uses self-developed adaptive wake-up technology and introduces a multi-channel algorithm to make voice wake-up and voice recognition more accurate, making communication feel like chatting with a family member. At the same time, the Canghai agent is better at thinking and can learn and grow on its own.\\nImage source: Leikeji on-site photography\\nNot only that, Changhong is implementing an 'ALL IN AI' strategy at this exhibition, deeply integrating artificial intelligence technology into a variety of OLED and QD-Mini LED TV products. For example, a 115-inch UMax AI TV with AI support has significantly improved picture quality, image, and panoramic sound. Combined with the UMAX ultra-picture quality engine, it allows users to always feel the dual enjoyment of sound and picture brought by AI technology and a comprehensive immersive viewing experience.\\nIn other words, the combination of agent and AI products makes the new generation of CHiQ products the industry's first true agent AI TV.\\n2. TCL: Focusing on both large screens and picture quality\\nAs a promoter of Mini-LED technology, TCL brought the so-called strongest 10,000-zone QD-Mini LED TV X11H, and the world's largest 115-inch QD-Mini LED TV X955 Max.\\nImage source: Leikeji on-site photography\\nAt the exhibition site, these two products attracted much attention. Leikeji waited for a long time to find a suitable angle for taking pictures. Although we have seen these products at other exhibitions, it does not prevent them from still being excellent products.\\nAmong them, the QD-Mini LED TV has 10,000-level backlight zones. The X11H is equipped with TCL CSOT's HVA A++ Dieyi Xingyao screen. Combined with a peak brightness of up to 6500 nits, it enhances the light and dark levels and fine details of the picture. Equipped with full-domain halo control technology, it can achieve precise control throughout the Mini-LED imaging chain, effectively solving the industry's halo problem.\\nIn addition, the 163-inch Micro LED giant screen TV X11H Max is also one of the star products in the TCL exhibition area. In March of this year, this product was officially released in China, but no matter how many times I see it, I still feel shocked. The X11H Max has an XDR brightness of 10,000 nits, more than 24.88 million built-in inorganic self-luminous chips, a 22-bit+ color depth, and a response speed that is said to be at the nanosecond level. The overall hardware level can be described as super top-tier.\\nImage source: Leikeji on-site photography\\n3. Hisense: Making better large screens for scenarios\\nBased on the three core technologies of chip, screen, and light, and deeply optimizing products for scenarios, is Hisense TV's core strategy.\\nAs the global partner of 'Black Myth: Wukong', Hisense TV directly brought the gaming scene that countless players dream of to the site. Several e-sports players used the Hisense 100-inch 'Black Myth: Wukong' custom TV E8N series to play games, and the on-site display effect was the best advertisement.\\nImage source: Leikeji on-site photography\\nIt is understood that the E8N series has exclusive core technologies in chips, screens, and audio. It has a super combination of '100-inch + Xinxin AI picture quality chip + Obsidian screen + Mini LED', and has very good competitiveness in the large-screen Mini-LED field.\\nIn addition to gaming scenarios, home theater is also one of the main TV scenarios promoted by Hisense. The lift-and-roll laser TV is the industry's first Fresnel rollable hidden TV, with a rollable screen ambient light blocking rate of up to 90%. Users can achieve high-precision lifting or hiding of the screen with one key, and the high-definition and high-brightness picture follows the screen's movement, which can make home viewing more ceremonial. The host and screen adopt a modular and separate design, which can be moved and combined freely, turning the living room/bedroom into a movie theater anytime, anywhere.\\nImage source: Leikeji on-site photography\\nSpeaking of display technology, we have to mention the 8K screen-sounding laser TV. This product has 8K picture quality and precisely controls 30 million pixels. At the same time, it is equipped with screen-sounding technology, with 100,000-level sound units allowing the entire screen to produce sound. The sound has no attenuation or distortion, and its performance in color and eye protection is also quite good.\\n4. Samsung: Multiple screens gather, continuing All For AI\\nAt the IFA, Samsung directly set up a Samsung hall, with a full display of its presence. According to Leikeji's observation, TV products with different display technologies such as Mini-LED, OLED, and Micro-LED were all on display, especially the Micro-LED super large screen, which was extremely eye-catching.\\nImage source: Leikeji on-site photography\\nAmong them, the Samsung Neo QLED 8K AI TV has a built-in NQ8 AI Gen3 processor with 512 neural networks (an 8-fold increase compared to the previous generation). To provide users with a personalized customized experience of high-quality sound and visual picture, this technology can enhance the visual display effect and auditory experience with the support of AI, bringing users high-quality sound and visual picture.\\nImage source: Leikeji on-site photography\\nStarting this year, new Samsung AI TVs and some 2023 models can enjoy Tizen operating system upgrade services to enhance the interconnected experience between all Samsung devices, and the continuously expanding SmartThings ecosystem is a key core element.\\nImage source: Leikeji on-site photography\\nCurrently, the SmartThings ecosystem has connected more than 500 million Samsung devices worldwide, providing seamless remote control experience for all of Samsung's AI-enabled products. Users can remotely control and manage all home appliances in real time. For example, users can remotely browse content on Samsung TVs.\\nIt seems that Samsung is determined to carry out 'ALL FOR AI' to the end.\\nWhere is TV heading? AI, large screens, scenarios, and display technology\\nLeikeji believes that there are four very obvious trends in the TV products displayed on the first day of IFA.\\n1. AI, AI, and more AI!\\nIn terms of promotion, although brands such as TCL and Hisense have integrated AI into their product technology, they did not particularly emphasize that their products are AI TVs at the exhibition. On the contrary, Samsung and Changhong put AI in a more prominent position, and both said they would go ALL IN AI.\\nImage source: Leikeji on-site photography\\nFrom a technical point of view, the TV products of the four brands have actually integrated AI, such as AI's tuning of hardware, optimization of picture and sound, and art TVs that use generative AI. These AI functions are becoming more and more common.\\nCurrently, the industry does not have a clear standard for AI TV. If you ask me, I think whether it is an AI TV is not that important. The key is the AI technology that brings actual improvements to users, just like Hisense's large model algorithm for gaming scenarios.\\n2. Bigger than big, screens from Plus to MAX!\\n163 inches, 136 inches, 115 inches, 100 inches...\\nAt this IFA 2024, almost every brand displayed large-screen TV products. Looking back at the gradually increasing TV sizes in the domestic market in recent years, the industry has long had a consensus: large-screen is a definite growth trend in the TV industry.\\nRetail data analysis from RUNTO shows that during this year's 618 shopping festival, overall TV sales fell by about 30%, but large-screen TVs showed a very amazing explosive power. TV products of 85 inches and above performed relatively well, especially 100-inch TVs, whose sales in 618 e-commerce retail activities increased by an astonishing 60% year-on-year.\\nImage source: Leikeji on-site photography\\nIn terms of other data, the average size of TVs increased by 9 inches compared to last year, reaching 69 inches. In the ultra-large size segment, that is, the market share of 85 inches and above increased significantly year-on-year, performing much better than 65-inch and 75-inch TVs.\\nLeikeji believes that the large-screen trend applies to the global market, and the process of large-sizing in the TV industry may lead the growth rate in other directions.\\n3. From gaming to sports to outdoors, deep optimization for scenarios.\\nHisense staff introduced to Leikeji that scenario-based development is a major trend in TV development at present.\\nThe E8N series TV, co-branded with 'Black Myth: Wukong', has carried out in-depth cooperation with Game Science around the gaming scenario. As far as this game is concerned, there may be no brand on the market that can surpass Hisense in terms of picture quality.\\nThe same experience can be applied to any game. If a certain TV brand can cooperate with most mainstream games on the market, then it will definitely become the first choice for players. Of course, the cost behind it is also huge, but the charm of scenario-based development is far from that.\\nImage source: Leikeji on-site photography\\nIn the past, people's impression of TVs should only exist in the living room or room, but with the popularization of modular design, TVs can also appear anywhere in the home like projectors. For example, the Hisense lift-and-roll laser TV with a modular and separate design for the host and screen, and the TCL third-generation art TV that can walk freely.\\n4. '*LED' multi-line evolution, a hundred flowers bloom in display technology\\nULED, QLED, Mini-LED, OLED, and Micro-LED are the 5 mainstream display technologies for TV products at this IFA. Although there are five, strictly speaking, there are three, because ULED and QLED are mainly used by Hisense and Samsung.\\nAnd among the three display technologies of Mini-LED, OLED, and Micro-LED, although brands have layouts, their strategies are significantly different. Domestic brands such as TCL, Hisense, Changhong, and Skyworth are more inclined to Mini-LED, Samsung is inclined to OLED, and Micro-LED is the hot cake that everyone uses to 'flex their muscles'.\\nSome time ago, Mini-LED TVs successfully surpassed OLED TVs in high-end TVs in the second quarter of 2024 with advantages such as low cost, high contrast, and high brightness. Domestic brands that bet on Mini-LED technology also tasted the sweetness. TCL surpassed Samsung and became the world's number one in Mini-LED TV shipments. Hisense gained a 17% share of the high-end TV market with the help of its Mini-LED product line.\\nImage source: Leikeji on-site photography\\nIn the medium and long term, the enormous market potential of Mini-LED TVs is beyond doubt. On the other hand, the OLED camp is also constantly improving its efficiency. Through technological innovations such as tandem architecture and Oxide backplanes, the display solution is becoming more and more perfect.\\nFor example, Samsung is consolidating its position in the high-end TV market by expanding its OLED product line. After launching an 83-inch model last year, Samsung recently launched 42-inch and 48-inch OLED TVs using LG Display's WOLED panels.\\nAt present, it is difficult for us to judge the two display technologies because they are completely different technical routes, and the final result has to be concluded by the market.\\nThe content of the IFA is indeed a bit too rich. Leikeji walked for a few days and only saw the tip of the iceberg. Just the TV products were dazzling, and one day was not enough to see them all.\\nThis is a good thing for consumers, because innovation means choice, and the more choices we have, the more we can choose the product with the best experience. Just like Micro-LED, there are no mass-produced products yet, and even if they are mass-produced, the price will definitely be ridiculously expensive, but who knows if it will enter ordinary people's homes like LED TVs in the future?\\nBringing hope to people, this may be the charm of technology.\\nIFA 2024 will last from the 6th to the 10th local time. Please continue to discover more surprises brought by technology with Leikeji in Berlin~");
return contents.stream().map(content -> {
return SubmitDocClusterTaskRequest.Documents.builder().content(content).build();
}).collect(Collectors.toList());
}
}
Custom topic clustering
This feature analyzes a batch of content or a hot spot event based on its popularity, user opinions, timeliness, and novelty.
You can analyze and generate a content plan.
Copy
package org.example.miaoce;
import com.alibaba.fastjson2.JSONObject;
import com.aliyun.aimiaobi20230801.Client;
import com.aliyun.aimiaobi20230801.models.*;
import com.aliyun.teaopenapi.models.Config;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
@Slf4j
public class MiaoCeSubmitTopicSelectionPerspectiveAnalysisTaskTest {
public static Client createClient() throws Exception {
// The AccessKey ID.
String accessKeyId = System.getenv("accessKeyId");
// The AccessKey secret.
String accessKeySecret = System.getenv("accessKeySecret");
// The domain name, for example, aimiaobi.cn-hangzhou.aliyuncs.com.
String endpoint = System.getenv("domain");
if (endpoint == null || endpoint.isEmpty()) {
endpoint = "aimiaobi.cn-hangzhou.aliyuncs.com";
}
Config config = new Config()
.setAccessKeyId(accessKeyId)
.setAccessKeySecret(accessKeySecret)
.setEndpoint(endpoint);
return new Client(config);
}
/**
* Analyzes topic selection perspectives.
*/
@Test
public void testSubmitTopicSelectionPerspectiveAnalysisTask() throws Exception {
String agentKey = System.getenv("AgentKey");
// Build the request client.
Client client = createClient();
SubmitTopicSelectionPerspectiveAnalysisTaskRequest request = new SubmitTopicSelectionPerspectiveAnalysisTaskRequest()
.setAgentKey(agentKey)
.setTopic("Hangzhou Asian Games");
// Submit the task.
SubmitTopicSelectionPerspectiveAnalysisTaskResponse taskResponse = client.submitTopicSelectionPerspectiveAnalysisTask(request);
if (taskResponse.getStatusCode() != 200) {
log.error("Failed to submit the hot topic selection perspective analysis task. Response: {}", JSONObject.toJSONString(taskResponse));
return;
}
log.info("Successfully submitted the hot topic selection perspective analysis task. Task ID: {}", taskResponse.getBody().getData().getTaskId());
// Poll the task ID.
GetTopicSelectionPerspectiveAnalysisTaskRequest queryRequest = GetTopicSelectionPerspectiveAnalysisTaskRequest.builder()
.agentKey(agentKey)
.taskId(taskResponse.getBody().getData().getTaskId()).build();
// Poll the result every second.
GetTopicSelectionPerspectiveAnalysisTaskResponse queryResponse;
while (true) {
queryResponse = client.getTopicSelectionPerspectiveAnalysisTask(queryRequest);
log.info("queryResponse:{}", JSONObject.toJSONString(queryResponse));
// If the task status is RUNNING or PENDING, wait for 1 second.
if ("RUNNING".equals(queryResponse.getBody().getData().getStatus()) || "PENDING".equals(queryResponse.getBody().getData().getStatus())) {
Thread.sleep(1000);
} else {
break;
}
}
if (queryResponse.getStatusCode() == 200 && queryResponse.getBody().getSuccess() && queryResponse.getBody().getData().getStatus().equals("SUCCESSED")) {
GetTopicSelectionPerspectiveAnalysisTaskResponseBody.Data data = queryResponse.getBody().getData();
log.info("Successfully obtained the hot topic selection perspective analysis task. Result: {}", JSONObject.toJSONString(data));
log.info("Topic event: {},", data.getTopic());
// Hot topic summary.
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.Summaries summary : data.getTopicSummaryResult().getSummaries()) {
System.out.printf("Title: %s%n", summary.getTitle());
System.out.printf("Summary: %s%n", summary.getSummary());
System.out.printf("News sources cited in the summary:%n");
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.DocList source : summary.getDocList()) {
System.out.printf("\tNews title: %s%n", source.getTitle());
System.out.printf("\tNews source: %s%n", source.getSource());
System.out.printf("\tNews link: %s%n%n", source.getUrl());
}
}
log.info("Hot topic summary analysis: {}", JSONObject.toJSONString(data.getTopicSummaryResult()));
// List of popular topic selection perspectives.
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.HotViewPointsResultAttitudes attitude : data.getHotViewPointsResult().getAttitudes()) {
System.out.printf("Popular viewpoint: [%s%n", attitude.getAttitude());
System.out.printf("Viewpoint ratio: %s%n", attitude.getRatio());
System.out.printf("List of popular topic selection perspectives:%n");
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.AttitudesViewPoints viewPoint : attitude.getViewPoints()) {
System.out.printf("\tPerspective name: %s%n", viewPoint.getPoint());
System.out.printf("\tPerspective summary: %s%n", viewPoint.getSummary());
System.out.printf("\tTopic planning:%n");
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.ViewPointsOutlines outline : viewPoint.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
System.out.println();
}
// Analysis of netizen topic selection perspectives.
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.WebReviewPointsResultAttitudes attitude : data.getWebReviewPointsResult().getAttitudes()) {
System.out.printf("Netizen viewpoint: [%s%n", attitude.getAttitude());
System.out.printf("Viewpoint ratio: %s%n", attitude.getRatio());
System.out.printf("List of netizen viewpoint perspectives:%n");
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.WebReviewPointsResultAttitudesViewPoints viewPoint : attitude.getViewPoints()) {
System.out.printf("\tPerspective name: %s%n", viewPoint.getPoint());
System.out.printf("\tPerspective summary: %s%n", viewPoint.getSummary());
System.out.printf("\tTopic planning:%n");
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.WebReviewPointsResultAttitudesViewPointsOutlines outline : viewPoint.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
System.out.println();
}
// Analysis of timely topic selection perspectives.
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.TimedViewPointsResultAttitudes attitude : data.getTimedViewPointsResult().getAttitudes()) {
System.out.printf("Timely viewpoint: [%s%n", attitude.getAttitude());
System.out.printf("News source: %s[%s]", attitude.getUrl(), attitude.getSource());
System.out.printf("List of timely viewpoint perspectives:%n");
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.TimedViewPointsResultAttitudesViewPoints viewPoint : attitude.getViewPoints()) {
System.out.printf("\tPerspective name: %s%n", viewPoint.getPoint());
System.out.printf("\tPerspective summary: %s%n", viewPoint.getSummary());
System.out.printf("\tTopic planning:%n");
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.AttitudesViewPointsOutlines outline : viewPoint.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
System.out.println();
}
// The novel perspective has only one viewpoint by default.
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.Attitudes attitude : data.getFreshViewPointsResult().getAttitudes()) {
System.out.printf("Novel viewpoint: [%s%n", attitude.getAttitude());
System.out.printf("List of novel perspectives:%n");
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.ViewPoints viewPoint : attitude.getViewPoints()) {
System.out.printf("\tPerspective name: %s%n", viewPoint.getPoint());
System.out.printf("\tPerspective summary: %s%n", viewPoint.getSummary());
System.out.printf("\tTopic planning:%n");
for (GetTopicSelectionPerspectiveAnalysisTaskResponseBody.Outlines outline : viewPoint.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
System.out.println();
}
} else {
log.error("Failed to obtain the hot topic selection perspective analysis task. Response: {}", JSONObject.toJSONString(queryResponse));
}
}
}
Custom perspective analysis
This feature analyzes a hot topic from a user-specified perspective and generates an outline for a topic plan.
Copy
package org.example.miaoce;
import com.alibaba.fastjson2.JSONObject;
import com.aliyun.auth.credentials.Credential;
import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
import com.aliyun.sdk.gateway.pop.Configuration;
import com.aliyun.sdk.gateway.pop.auth.SignatureVersion;
import com.aliyun.sdk.service.aimiaobi20230801.AsyncClient;
import com.aliyun.sdk.service.aimiaobi20230801.models.*;
import darabonba.core.client.ClientOverrideConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
@Slf4j
public class MiaoCeSubmitCustomTopicSelectionPerspectiveAnalysisTaskTest {
public static AsyncClient asyncClient() {
// The AccessKey ID.
String accessKeyId = System.getenv("accessKeyId");
// The AccessKey secret.
String accessKeySecret = System.getenv("accessKeySecret");
// The domain name, for example, aimiaobi.cn-hangzhou.aliyuncs.com.
String domain = System.getenv("domain");
return AsyncClient.builder().credentialsProvider(StaticCredentialProvider.create(Credential.builder()
.accessKeyId(accessKeyId).accessKeySecret(accessKeySecret).build())).serviceConfiguration(Configuration.create().setSignatureVersion(SignatureVersion.V3)).overrideConfiguration(ClientOverrideConfiguration.create().setProtocol("HTTPS")
.setEndpointOverride(domain)).build();
}
/**
* Analyzes topic selection perspectives.
*/
@Test
public void testSubmitCustomTopicSelectionPerspectiveAnalysisTask() throws ExecutionException, InterruptedException, IOException {
String agentKey = System.getenv("AgentKey");
// Build the request client.
AsyncClient asyncClient = asyncClient();
SubmitCustomTopicSelectionPerspectiveAnalysisTaskRequest request = SubmitCustomTopicSelectionPerspectiveAnalysisTaskRequest.builder().agentKey(agentKey)
.prompt("Analyze the economic impact of the Hangzhou Asian Games on Hangzhou").build();
// Submit the task.
SubmitCustomTopicSelectionPerspectiveAnalysisTaskResponse taskResponse = asyncClient.submitCustomTopicSelectionPerspectiveAnalysisTask(request).get();
if (taskResponse.getStatusCode() != 200) {
log.error("Failed to submit the custom hot topic selection perspective analysis task. Response: {}", JSONObject.toJSONString(taskResponse));
return;
}
log.info("Successfully submitted the custom hot topic selection perspective analysis task. Task ID: {}", taskResponse.getBody().getData().getTaskId());
// Poll the task ID.
GetCustomTopicSelectionPerspectiveAnalysisTaskRequest queryRequest = GetCustomTopicSelectionPerspectiveAnalysisTaskRequest.builder()
.agentKey(agentKey)
.taskId(taskResponse.getBody().getData().getTaskId()).build();
// Poll the result every second.
GetCustomTopicSelectionPerspectiveAnalysisTaskResponse queryResponse;
while (true) {
CompletableFuture<GetCustomTopicSelectionPerspectiveAnalysisTaskResponse> getTaskResponse = asyncClient.getCustomTopicSelectionPerspectiveAnalysisTask(queryRequest);
queryResponse = getTaskResponse.get();
log.info("queryResponse:{}", JSONObject.toJSONString(queryResponse));
// If the task status is RUNNING or PENDING, wait for 1 second.
if ("RUNNING".equals(queryResponse.getBody().getData().getStatus()) || "PENDING".equals(queryResponse.getBody().getData().getStatus())) {
Thread.sleep(1000);
} else {
break;
}
}
if (queryResponse.getStatusCode() == 200 && queryResponse.getBody().getSuccess() && queryResponse.getBody().getData().getStatus().equals("SUCCESSED")) {
GetCustomTopicSelectionPerspectiveAnalysisTaskResponseBody.Data data = queryResponse.getBody().getData();
// Custom result.
GetCustomTopicSelectionPerspectiveAnalysisTaskResponseBody.CustomViewPointsResult viewPointsResult = data.getCustomViewPointsResult();
log.info("Topic event: {},", viewPointsResult.getTopic());
// List of custom viewpoints.
for (GetCustomTopicSelectionPerspectiveAnalysisTaskResponseBody.Attitudes attitude : data.getCustomViewPointsResult().getAttitudes()) {
System.out.printf("Custom viewpoint: %s%n", attitude.getAttitude());
System.out.printf("List of custom perspectives:%n");
for (GetCustomTopicSelectionPerspectiveAnalysisTaskResponseBody.ViewPoints viewPoint : attitude.getViewPoints()) {
System.out.printf("\tPerspective name: %s%n", viewPoint.getPoint());
System.out.printf("\tPerspective summary: %s%n", viewPoint.getSummary());
System.out.printf("\tTopic planning:%n");
for (GetCustomTopicSelectionPerspectiveAnalysisTaskResponseBody.Outlines outline : viewPoint.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
System.out.println();
}
} else {
log.error("Failed to obtain the custom hot topic selection perspective analysis task. Response: {}", JSONObject.toJSONString(queryResponse));
}
}
}
SaaS page query APIs
This feature involves the following APIs: ListHotSources - Retrieves a list of third-party hot list sources, ListHotTopics - Retrieves a list of hot topics, ListHotViewPoints - Retrieves a list of popular perspectives, ListWebReviewPoints - Retrieves a list of user perspectives, ListFreshViewPoints - Retrieves a list of novel perspectives, and ListTimedViewAttitude - Retrieves a list of timely perspectives.Copy
package org.example.miaoce;
import com.aliyun.auth.credentials.Credential;
import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
import com.aliyun.sdk.gateway.pop.Configuration;
import com.aliyun.sdk.gateway.pop.auth.SignatureVersion;
import com.aliyun.sdk.service.aimiaobi20230801.AsyncClient;
import com.aliyun.sdk.service.aimiaobi20230801.models.*;
import darabonba.core.client.ClientOverrideConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.Test;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
@Slf4j
public class MiaoCePortalQueryDemoTest {
public static AsyncClient asyncClient() {
// The AccessKey ID.
String accessKeyId = System.getenv("accessKeyId");
// The AccessKey secret.
String accessKeySecret = System.getenv("accessKeySecret");
// The domain name, for example, aimiaobi.cn-hangzhou.aliyuncs.com.
String domain = System.getenv("domain");
return AsyncClient.builder().credentialsProvider(StaticCredentialProvider.create(Credential.builder()
.accessKeyId(accessKeyId).accessKeySecret(accessKeySecret).build())).serviceConfiguration(Configuration.create().setSignatureVersion(SignatureVersion.V3)).overrideConfiguration(ClientOverrideConfiguration.create().setProtocol("HTTPS")
.setEndpointOverride(domain)).build();
}
/**
* Demo for Miaoce query APIs on the SaaS page.
*/
@Test
public void testPortalApiDemo() throws ExecutionException, InterruptedException {
AsyncClient asyncClient = asyncClient();
String agentKey = System.getenv("AgentKey");
CompletableFuture<ListHotSourcesResponse> hotSources = asyncClient.listHotSources(ListHotSourcesRequest.builder().agentKey(agentKey).build());
ListHotSourcesResponse response = hotSources.get();
// Obtain all third-party sources.
for (ListHotSourcesResponseBody.Data datum : response.getBody().getData()) {
log.info("Third-party source name: {}", datum.getSource());
}
ListHotSourcesResponseBody.Data source = response.getBody().getData().get(0);
// Get data from the first third-party source.
ListHotTopicsResponse listHotTopics =
asyncClient.listHotTopics(ListHotTopicsRequest.builder().agentKey(agentKey)
.topicSource(source.getSource()).build()).get();
// Obtain all hot topics from this source.
for (ListHotTopicsResponseBody.Data datum : listHotTopics.getBody().getData()) {
String summary = datum.getStructureSummary().stream().map(x -> {
return String.format("[%s]%s", x.getTitle(), x.getSummary());
}).collect(Collectors.joining("\n"));
log.info("Hot topic name: {}, Summary: {}", datum.getTopic(), summary);
}
// Obtain the national hot topic list.
listHotTopics = listHotTopicResponseAggregation(asyncClient, agentKey);
// Obtain the hot topics for a specific topic's popular perspective selection.
ListHotTopicsResponseBody.Data topicObj = listHotTopics.getBody().getData().get(0);
String topic = topicObj.getTopic();
String topicSource = topicObj.getTopicSource();
// Obtain the list of popular topic selection viewpoints.
log.info("Obtain the list of popular topic selection viewpoints");
listHotViewPoints(asyncClient, agentKey, topic, topicSource);
// Obtain the list of timely topic selection perspectives.
log.info("Obtain the list of timely topic selection perspectives");
listTimedAttitude(asyncClient, agentKey, topic, topicSource);
// Obtain the list of netizen topic selection viewpoints.
log.info("Obtain the list of netizen topic selection viewpoints");
listWebReviewPoints(asyncClient, agentKey, topicSource, topic);
// List of novel topic selection perspectives.
log.info("Obtain the list of novel topic selection perspectives");
listFreshViewPoint(asyncClient, agentKey, topic, topicSource);
}
private static void listFreshViewPoint(AsyncClient asyncClient, String agentKey, String topic, String topicSource) throws InterruptedException, ExecutionException {
ListFreshViewPointsResponse freshViewPointsResponse = asyncClient.listFreshViewPoints(
ListFreshViewPointsRequest.builder().agentKey(agentKey).topic(topic).topicSource(topicSource).build()).get();
for (ListFreshViewPointsResponseBody.Data item : freshViewPointsResponse.getBody().getData()) {
System.out.printf("\tPerspective name: %s%n", item.getPoint());
System.out.printf("\tPerspective summary: %s%n", item.getSummary());
System.out.printf("\tTopic planning:%n");
for (ListFreshViewPointsResponseBody.Outlines outline : item.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
}
private static void listWebReviewPoints(AsyncClient asyncClient, String agentKey, String topicSource, String topic) throws InterruptedException, ExecutionException {
ListWebReviewPointsResponse webReviewPointsResponse = asyncClient.listWebReviewPoints(ListWebReviewPointsRequest.builder()
.agentKey(agentKey).topicSource(topicSource).topic(topic).build()).get();
// List of popular topic selection viewpoints.
for (ListWebReviewPointsResponseBody.Data item : webReviewPointsResponse.getBody().getData()) {
System.out.printf("Netizen viewpoint: [%s%n", item.getAttitude());
System.out.printf("Viewpoint ratio: %s%n", item.getRatio());
System.out.printf("List of netizen viewpoint perspectives:%n");
for (ListWebReviewPointsResponseBody.ViewPoints viewPoint : item.getViewPoints()) {
System.out.printf("\tPerspective name: %s%n", viewPoint.getPoint());
System.out.printf("\tPerspective summary: %s%n", viewPoint.getSummary());
System.out.printf("\tTopic planning:%n");
for (ListWebReviewPointsResponseBody.Outlines outline : viewPoint.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
System.out.println();
}
}
private static void listTimedAttitude(AsyncClient asyncClient, String agentKey, String topic, String topicSource) throws InterruptedException, ExecutionException {
ListTimedViewAttitudeResponse timedViewAttitudeResponse = asyncClient.listTimedViewAttitude(
ListTimedViewAttitudeRequest.builder().agentKey(agentKey).topic(topic).topicSource(topicSource).build()).get();
for (ListTimedViewAttitudeResponseBody.Data item : timedViewAttitudeResponse.getBody().getData()) {
System.out.printf("News title: %s%n", item.getAttitude());
System.out.printf("News source: %s[%s]%n", item.getUrl(), item.getSource());
System.out.printf("List of timely perspectives:%n");
for (ListTimedViewAttitudeResponseBody.ViewPoints viewPoint : item.getViewPoints()) {
System.out.printf("\tPerspective name: %s%n", viewPoint.getPoint());
System.out.printf("\tPerspective summary: %s%n", viewPoint.getSummary());
System.out.printf("\tTopic planning:%n");
for (ListTimedViewAttitudeResponseBody.Outlines outline : viewPoint.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
System.out.println();
}
}
private static void listHotViewPoints(AsyncClient asyncClient, String agentKey, String topic, String topicSource) throws InterruptedException, ExecutionException {
ListHotViewPointsResponse hotViewPointsResponse = asyncClient.listHotViewPoints(ListHotViewPointsRequest.builder().agentKey(
agentKey).topic(topic).topicSource(topicSource).build()).get();
// List of popular topic selection viewpoints.
for (ListHotViewPointsResponseBody.Data item : hotViewPointsResponse.getBody().getData()) {
System.out.printf("Popular viewpoint: [%s%n", item.getAttitude());
System.out.printf("Viewpoint ratio: %s%n", item.getRatio());
System.out.printf("List of popular topic selection perspectives:%n");
for (ListHotViewPointsResponseBody.ViewPoints viewPoint : item.getViewPoints()) {
System.out.printf("\tPerspective name: %s%n", viewPoint.getPoint());
System.out.printf("\tPerspective summary: %s%n", viewPoint.getSummary());
System.out.printf("\tTopic planning:%n");
for (ListHotViewPointsResponseBody.Outlines outline : viewPoint.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
System.out.println();
}
}
private static @NotNull ListHotTopicsResponse listHotTopicResponseAggregation(AsyncClient asyncClient, String agentKey) throws InterruptedException, ExecutionException {
ListHotTopicsResponse listHotTopics;
listHotTopics =
asyncClient.listHotTopics(ListHotTopicsRequest.builder().agentKey(agentKey)
.topicSource("Aggregation").build()).get();
// Obtain all hot topics from this source.
for (ListHotTopicsResponseBody.Data datum : listHotTopics.getBody().getData()) {
String summary = datum.getStructureSummary().stream().map(x -> {
return String.format("[%s]%s", x.getTitle(), x.getSummary());
}).collect(Collectors.joining("\n"));
log.info("National hot topic name: {}, Summary: {}", datum.getTopic(), summary);
}
return listHotTopics;
}
}
Custom data source
You can use the following demo for API calls.
- To use a custom data source, you must first activate the service. To do this, click All-in-one Intelligent Retrieval and Generation Application Pay-As-You-Go API.
- Custom data sources are billed based on token consumption. You can call other Miaoce APIs by purchasing the public cloud subscription of Miaobi and Miaoce. For more information about the billing of custom data sources, see Billing rules (Miaoce - Custom data source).
Copy
package org.example.miaoce;
import com.alibaba.fastjson2.JSONObject;
import com.aliyun.auth.credentials.Credential;
import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
import com.aliyun.sdk.gateway.pop.Configuration;
import com.aliyun.sdk.gateway.pop.auth.SignatureVersion;
import com.aliyun.sdk.service.aimiaobi20230801.AsyncClient;
import com.aliyun.sdk.service.aimiaobi20230801.models.*;
import darabonba.core.client.ClientOverrideConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
/**
* * Prerequisites
* * <dependency>
* * <groupId>com.aliyun</groupId>
* * <artifactId>alibabacloud-aimiaobi20230801</artifactId>
* * <version>Use the latest version. For more information, see: https://api.aliyun.com/api-tools/sdk/AiMiaoBi?version=2023-08-01&language=java-async-tea&tab=primer-doc</version>
* * </dependency>
* *
* * <dependency>
* * <groupId>org.projectlombok</groupId>
* * <artifactId>lombok</artifactId>
* * <version>1.18.30</version>
* * </dependency>
* *
* * <dependency>
* * <groupId>com.alibaba.fastjson2</groupId>
* * <artifactId>fastjson2</artifactId>
* * <version>2.0.21</version>
* * </dependency>
* * <dependency>
* * <groupId>org.junit.jupiter</groupId>
* * <artifactId>junit-jupiter</artifactId>
* * <version>5.8.1</version>
* * </dependency>
* <p>
*
* For more information, see the API documentation:
* https://help.aliyun.com/en/model-studio/api-aimiaobi-2023-08-01-dir-tips-custom-data-source/?spm=a2c4g.11186623.help-menu-2400256.d_1_7_4_2_0_3_9.411d7544s0dRMp
*/
@Slf4j
public class SubmitCustomSourceTopicAnalysisTest {
private static String accessKeyId = System.getenv("accessKeyId");
private static String accessKeySecret = System.getenv("accessKeySecret");
private static String workspaceId = System.getenv("WorkspaceId");
private static String agentKey = System.getenv("AgentKey");
private static String endpoint = "aimiaobi.cn-beijing.aliyuncs.com";
public static AsyncClient asyncClient() {
return AsyncClient.builder().credentialsProvider(
StaticCredentialProvider.create(Credential.builder().accessKeyId(accessKeyId).accessKeySecret(accessKeySecret).build())
).serviceConfiguration(Configuration.create().setSignatureVersion(SignatureVersion.V3)).overrideConfiguration(
ClientOverrideConfiguration.create().setProtocol("HTTPS").setEndpointOverride(endpoint)
).build();
}
@Test
public void testSubmitCustomSourceTopicAnalysis() throws InterruptedException, IOException, ExecutionException {
AsyncClient asyncClient = asyncClient();
String fileUrl = "https://aimiaobi-service-prod.oss-cn-beijing.aliyuncs.com/temp/input_news_list_20.json";
SubmitCustomSourceTopicAnalysisRequest.Builder builder = SubmitCustomSourceTopicAnalysisRequest.builder().workspaceId(workspaceId);
// The file URL and its format. JSON (a JSON array where each item is a news object) and JSON Lines (each line is a news object) formats are supported. The data structure is the same as the news field.
builder.fileType("json").fileUrl(fileUrl);
// You can also pass an object list directly.
//builder.news(Arrays.asList(SubmitCustomSourceTopicAnalysisRequest.News.builder().url("<url>").title("<Title>").content("<Content>").build()));
// The maximum number of topics to analyze.
builder.maxTopicSize(2);
CompletableFuture<SubmitCustomSourceTopicAnalysisResponse> submitFuture = asyncClient.submitCustomSourceTopicAnalysis(builder.build());
SubmitCustomSourceTopicAnalysisResponse response = submitFuture.get();
// The asynchronous task ID.
String taskId = response.getBody().getData().getTaskId();
while (true) {
CompletableFuture<GetCustomSourceTopicAnalysisTaskResponse> taskFuture = asyncClient.getCustomSourceTopicAnalysisTask(GetCustomSourceTopicAnalysisTaskRequest.builder().workspaceId(workspaceId).taskId(taskId).build());
GetCustomSourceTopicAnalysisTaskResponseBody body = taskFuture.get().getBody();
if (!body.getSuccess()) {
System.out.printf("Failed to query the task. Error code: %s, Error message: %s\n", body.getCode(), body.getMessage());
return;
}
// Poll only when the status is PENDING or RUNNING.
GetCustomSourceTopicAnalysisTaskResponseBody.Data data = body.getData();
System.out.printf("Number of parsed news articles: %d, Number of clustered news articles: %d, Maximum number of documents in a cluster: %d\n", data.getParsedNewsSize(), data.getClusterCount(), data.getMaxClusteredTopicNewsSize());
if (data.getStatus().equals("PENDING") || data.getStatus().equals("RUNNING")) {
System.out.printf("Task is running. TaskId: %s, TaskStatus: %s\n", taskId, data.getStatus());
Thread.sleep(1000);
continue;
}
if (!data.getStatus().equals("SUCCESSED")) {
System.out.printf("Task failed. Error message: %s\n", data.getErrorMessage());
break;
}
System.out.printf("Response: %s\n", JSONObject.toJSONString(data));
List<GetCustomSourceTopicAnalysisTaskResponseBody.ClusterResults> clusterResults = data.getClusterResults();
System.out.println("News clustering result: " + JSONObject.toJSONString(clusterResults));
System.out.println("Time consumed (milliseconds): " + data.getRt());
System.out.println("Token usage: " + JSONObject.toJSONString(data.getUsages()));
// Query the details list.
//doListDetails(taskId, asyncClient);
// Export the full results file.
exportFullResults(taskId, asyncClient);
break;
}
}
private static void exportFullResults(String taskId, AsyncClient asyncClient) throws InterruptedException, ExecutionException, IOException {
ExportCustomSourceAnalysisTaskRequest.Builder exportBuilder = ExportCustomSourceAnalysisTaskRequest.builder();
exportBuilder.workspaceId(workspaceId);
exportBuilder.taskId(taskId);
CompletableFuture<ExportCustomSourceAnalysisTaskResponse> responseFuture = asyncClient.exportCustomSourceAnalysisTask(exportBuilder.build());
// The download URL is for a file.
String url = responseFuture.get().getBody().getData();
// Download the file.
String s = downResultFile(url);
System.out.println(s);
}
private static String downResultFile(String url) throws IOException {
URL url1 = new URL(url);
HttpURLConnection urlConnection = (HttpURLConnection) url1.openConnection();
// Set the request method.
urlConnection.setRequestMethod("GET");
String fileName = null;
String contentDisposition = urlConnection.getHeaderField("Content-Disposition");
if (contentDisposition != null && contentDisposition.contains("filename=")) {
int startIndex = contentDisposition.indexOf("filename=") + 9;
int endIndex = contentDisposition.indexOf(";", startIndex);
if (endIndex == -1) {
endIndex = contentDisposition.length();
}
String extractedFileName = contentDisposition.substring(startIndex, endIndex).replace("\"", "");
if (!extractedFileName.isEmpty()) {
fileName = extractedFileName;
}
}
// Create a temporary directory.
String tmpDir = System.getProperty("java.io.tmpdir");
java.io.File tempDir = new java.io.File(tmpDir);
if (!tempDir.exists()) {
tempDir.mkdirs();
}
if (fileName == null) {
// random uuid
fileName = UUID.randomUUID().toString();
}
// Create a file in the temporary directory.
java.io.File outputFile = new java.io.File(tempDir, fileName);
// Get the input stream.
try (java.io.InputStream inputStream = urlConnection.getInputStream();
java.io.FileOutputStream outputStream = new java.io.FileOutputStream(outputFile)) {
byte[] buffer = new byte[4096];
int bytesRead;
// Read data and write it to the file.
while ((bytesRead = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead);
}
String absolutePath = outputFile.getAbsolutePath();
System.out.println("File successfully downloaded to the temporary directory: " + absolutePath);
return absolutePath;
} catch (IOException e) {
System.err.println("An error occurred while downloading the file: " + e.getMessage());
}
return null;
}
private static void doListDetails(String taskId, AsyncClient asyncClient) throws InterruptedException, ExecutionException {
// Obtain topic analysis details. Pass the task ID as the version number. "Custom" indicates a custom data source. Get the top 10 data entries.
ListHotTopicsRequest.Builder queryBuilder = ListHotTopicsRequest.builder();
// For historical reasons, you must specify agentKey.
queryBuilder.agentKey(agentKey);
queryBuilder.topicSource("Custom");
queryBuilder.topicVersion(taskId);
queryBuilder.maxResults(10);
// Obtain all clustered topics.
ListHotTopicsResponse listHotTopics = asyncClient.listHotTopics(queryBuilder.build()).get();
List<ListHotTopicsResponseBody.Data> data = listHotTopics.getBody().getData();
for (ListHotTopicsResponseBody.Data datum : data) {
String topic = datum.getTopic();
// Topic summary.
List<ListHotTopicsResponseBody.StructureSummary> structureSummary = datum.getStructureSummary();
System.out.printf("Clustered topic: %s, Topic summary: %s", topic, JSONObject.toJSONString(structureSummary));
}
// Query the topic selection details for the first topic.
ListHotTopicsResponseBody.Data data1 = data.get(0);
String topic = data1.getTopic();
queryTopicSelectionDetail(asyncClient, topic);
}
/**
* Topic selection details
*/
private static void queryTopicSelectionDetail(AsyncClient asyncClient, String topic) throws InterruptedException, ExecutionException {
String topicSource = "Custom";
// Obtain the list of popular topic selection viewpoints.
log.info("Obtain the list of popular topic selection viewpoints");
listHotViewPoints(asyncClient, agentKey, topic, topicSource);
// Obtain the list of timely topic selection perspectives.
log.info("Obtain the list of timely topic selection perspectives");
listTimedAttitude(asyncClient, agentKey, topic, topicSource);
// Obtain the list of netizen topic selection viewpoints.
log.info("Obtain the list of netizen topic selection viewpoints");
listWebReviewPoints(asyncClient, agentKey, topicSource, topic);
// List of novel topic selection perspectives.
log.info("Obtain the list of novel topic selection perspectives");
listFreshViewPoint(asyncClient, agentKey, topic, topicSource);
}
private static void listFreshViewPoint(AsyncClient asyncClient, String agentKey, String topic, String topicSource) throws InterruptedException, ExecutionException {
ListFreshViewPointsResponse freshViewPointsResponse = asyncClient.listFreshViewPoints(
ListFreshViewPointsRequest.builder().agentKey(agentKey).topic(topic).topicSource(topicSource).build()).get();
for (ListFreshViewPointsResponseBody.Data item : freshViewPointsResponse.getBody().getData()) {
System.out.printf("\tPerspective name: %s%n", item.getPoint());
System.out.printf("\tPerspective summary: %s%n", item.getSummary());
System.out.printf("\tTopic planning:%n");
for (ListFreshViewPointsResponseBody.Outlines outline : item.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
}
private static void listWebReviewPoints(AsyncClient asyncClient, String agentKey, String topicSource, String topic) throws InterruptedException, ExecutionException {
ListWebReviewPointsResponse webReviewPointsResponse = asyncClient.listWebReviewPoints(ListWebReviewPointsRequest.builder()
.agentKey(agentKey).topicSource(topicSource).topic(topic).build()).get();
// List of popular topic selection viewpoints.
for (ListWebReviewPointsResponseBody.Data item : webReviewPointsResponse.getBody().getData()) {
System.out.printf("Netizen viewpoint: [%s%n", item.getAttitude());
System.out.printf("Viewpoint ratio: %s%n", item.getRatio());
System.out.printf("List of netizen viewpoint perspectives:%n");
for (ListWebReviewPointsResponseBody.ViewPoints viewPoint : item.getViewPoints()) {
System.out.printf("\tPerspective name: %s%n", viewPoint.getPoint());
System.out.printf("\tPerspective summary: %s%n", viewPoint.getSummary());
System.out.printf("\tTopic planning:%n");
for (ListWebReviewPointsResponseBody.Outlines outline : viewPoint.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
System.out.println();
}
}
private static void listTimedAttitude(AsyncClient asyncClient, String agentKey, String topic, String topicSource) throws InterruptedException, ExecutionException {
ListTimedViewAttitudeResponse timedViewAttitudeResponse = asyncClient.listTimedViewAttitude(
ListTimedViewAttitudeRequest.builder().agentKey(agentKey).topic(topic).topicSource(topicSource).build()).get();
for (ListTimedViewAttitudeResponseBody.Data item : timedViewAttitudeResponse.getBody().getData()) {
System.out.printf("News title: %s%n", item.getAttitude());
System.out.printf("News source: %s[%s]%n", item.getUrl(), item.getSource());
System.out.printf("List of timely perspectives:%n");
for (ListTimedViewAttitudeResponseBody.ViewPoints viewPoint : item.getViewPoints()) {
System.out.printf("\tPerspective name: %s%n", viewPoint.getPoint());
System.out.printf("\tPerspective summary: %s%n", viewPoint.getSummary());
System.out.printf("\tTopic planning:%n");
for (ListTimedViewAttitudeResponseBody.Outlines outline : viewPoint.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
System.out.println();
}
}
private static void listHotViewPoints(AsyncClient asyncClient, String agentKey, String topic, String topicSource) throws InterruptedException, ExecutionException {
ListHotViewPointsResponse hotViewPointsResponse = asyncClient.listHotViewPoints(ListHotViewPointsRequest.builder().agentKey(
agentKey).topic(topic).topicSource(topicSource).build()).get();
// List of popular topic selection viewpoints.
for (ListHotViewPointsResponseBody.Data item : hotViewPointsResponse.getBody().getData()) {
System.out.printf("Popular viewpoint: [%s%n", item.getAttitude());
System.out.printf("Viewpoint ratio: %s%n", item.getRatio());
System.out.printf("List of popular topic selection perspectives:%n");
for (ListHotViewPointsResponseBody.ViewPoints viewPoint : item.getViewPoints()) {
System.out.printf("\tPerspective name: %s%n", viewPoint.getPoint());
System.out.printf("\tPerspective summary: %s%n", viewPoint.getSummary());
System.out.printf("\tTopic planning:%n");
for (ListHotViewPointsResponseBody.Outlines outline : viewPoint.getOutlines()) {
System.out.printf("\t\tOutline: %s%n", outline.getOutline());
System.out.printf("\t\tSummary: %s%n%n", outline.getSummary());
}
}
System.out.println();
}
}
}