4.4 Counting Distinct Elements in a StreamIn this section we look at a dịch - 4.4 Counting Distinct Elements in a StreamIn this section we look at a Việt làm thế nào để nói

4.4 Counting Distinct Elements in a

4.4 Counting Distinct Elements in a Stream
In this section we look at a third simple kind of processing we might want to do on a stream. As with the previous examples – sampling and filtering – it is somewhat tricky to do what we want in a reasonable amount of main memory, so we use a variety of hashing and a randomized algorithm to get approximately what we want with little space needed per stream.
4.4.1 The Count-Distinct Problem
Suppose stream elements are chosen from some universal set. We would like to know how many different elements have appeared in the stream, counting either from the beginning of the stream or from some known time in the past.
Example 4.5: As a useful example of this problem, consider a Web site gath- ering statistics on how many unique users it has seen in each given month. The universal set is the set of logins for that site, and a stream element is generated each time someone logs in. This measure is appropriate for a site like Amazon, where the typical user logs in with their unique login name. A similar problem is a Web site like Google that does not require login to issue a search query, and may be able to identify users only by the IP address from which they send the query. There are about 4 billion IP addresses,2 sequences of four 8-bit bytes will serve as the universal set in this case. 2
The obvious way to solve the problem is to keep in main memory a list of all the elements seen so far in the stream. Keep them in an efficient search structure such as a hash table or search tree, so one can quickly add new elements and check whether or not the element that just arrived on the stream was already seen. As long as the number of distinct elements is not too great, this structure can fit in main memory and there is little problem obtaining an exact answer to the question how many distinct elements appear in the stream. However, if the number of distinct elements is too great, or if there are too many streams that need to be processed at once (e.g., Yahoo! wants to count the number of unique users viewing each of its pages in a month), then we cannot store the needed data in main memory. There are several options. We could use more machines, each machine handling only one or several of the streams. We could store most of the data structure in secondary memory and batch stream elements so whenever we brought a disk block to main memory there would be many tests and updates to be performed on the data in that block. Or we could use the strategy to be discussed in this section, where we only estimate the number of distinct elements but use much less memory than the number of distinct elements.

0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
4,4 đếm các yếu tố khác biệt trong một dòng
trong phần này chúng ta nhìn vào một loại đơn giản thứ ba xử lý chúng tôi có thể muốn làm trên một dòng. Như với các ví dụ trước-lấy mẫu và filtering-đó là một chút khôn lanh để làm những gì chúng tôi muốn trong một số tiền hợp lý của bộ nhớ chính, Vì vậy, chúng tôi sử dụng một loạt các băm và một thuật toán ngẫu nhiên để có được khoảng những gì chúng tôi muốn có ít không gian cần thiết cho mỗi dòng.
4.4.1 vấn đề tính khác biệt
giả sử stream yếu tố được lựa chọn từ một số thiết lập universal. Chúng tôi muốn biết bao nhiêu different yếu tố đã xuất hiện trong luồng, kể từ khi bắt đầu dòng hoặc từ một số thời gian được biết đến trong quá khứ.
ví dụ 4.5: như là một ví dụ hữu ích của vấn đề này, hãy xem xét một số liệu thống kê trang Web gath-ering trên bao nhiêu người dùng duy nhất, nó đã thấy trong mỗi tháng nhất định. Tập universal là tập hợp các thông tin đăng nhập cho trang web đó, và một dòng yếu tố được tạo ra mỗi khi ai đó đăng nhập. Biện pháp này là thích hợp cho một trang web như Amazon, nơi điển hình người dùng bản ghi với tên đăng nhập duy nhất của họ. Một vấn đề tương tự như là một trang Web như Google mà không cần đăng nhập để phát hành một truy vấn tìm kiếm, và có thể xác định người sử dụng chỉ bởi địa chỉ IP mà từ đó họ gửi truy vấn. Có khoảng 4 tỷ địa chỉ IP, trình tự 2 của bốn 8-bit byte sẽ phục vụ như là bộ universal trong trường hợp này. 2
Cách rõ ràng để giải quyết vấn đề là để giữ trong bộ nhớ chính một danh sách tất cả các yếu tố mà thấy cho đến nay trong dòng. Giữ chúng trong một cấu trúc tìm efficient như một băm bảng hoặc tìm cái cây, để một nhanh chóng có thể thêm yếu tố mới và kiểm tra hay không các yếu tố mà chỉ cần đến trên dòng đã được nhìn thấy. Miễn là một số yếu tố khác biệt không phải là quá lớn, cấu trúc này có thể fit trong bộ nhớ chính và có ít vấn đề nhận được một câu trả lời chính xác cho câu hỏi làm thế nào nhiều yếu tố khác biệt xuất hiện trong luồng. Tuy nhiên, nếu số lượng các yếu tố khác biệt là quá lớn, hoặc nếu có quá nhiều dòng mà cần phải được xử lý cùng một lúc (ví dụ như, Yahoo! muốn đếm số lượng người dùng duy nhất xem mỗi trang web của nó trong một tháng), sau đó chúng tôi không thể lưu trữ dữ liệu cần thiết trong bộ nhớ chính. Có rất nhiều lựa chọn. Chúng tôi có thể sử dụng thêm máy, mỗi máy xử lý một duy nhất hoặc một số dòng. Chúng tôi có thể lưu trữ hầu hết cấu trúc dữ liệu trong bộ nhớ thứ cấp và lô stream yếu tố vì vậy bất cứ khi nào chúng tôi đưa một khối đĩa đến bộ nhớ chính sẽ có nhiều bài kiểm tra và Cập Nhật được thực hiện trên các dữ liệu trong đó khối. Hoặc chúng tôi có thể sử dụng các chiến lược được thảo luận trong phần này, nơi chúng tôi chỉ ước tính số lượng các yếu tố khác biệt nhưng sử dụng ít bộ nhớ hơn số lượng các yếu tố khác biệt.

đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
4.4 Counting Distinct Elements in a Stream
In this section we look at a third simple kind of processing we might want to do on a stream. As with the previous examples – sampling and filtering – it is somewhat tricky to do what we want in a reasonable amount of main memory, so we use a variety of hashing and a randomized algorithm to get approximately what we want with little space needed per stream.
4.4.1 The Count-Distinct Problem
Suppose stream elements are chosen from some universal set. We would like to know how many different elements have appeared in the stream, counting either from the beginning of the stream or from some known time in the past.
Example 4.5: As a useful example of this problem, consider a Web site gath- ering statistics on how many unique users it has seen in each given month. The universal set is the set of logins for that site, and a stream element is generated each time someone logs in. This measure is appropriate for a site like Amazon, where the typical user logs in with their unique login name. A similar problem is a Web site like Google that does not require login to issue a search query, and may be able to identify users only by the IP address from which they send the query. There are about 4 billion IP addresses,2 sequences of four 8-bit bytes will serve as the universal set in this case. 2
The obvious way to solve the problem is to keep in main memory a list of all the elements seen so far in the stream. Keep them in an efficient search structure such as a hash table or search tree, so one can quickly add new elements and check whether or not the element that just arrived on the stream was already seen. As long as the number of distinct elements is not too great, this structure can fit in main memory and there is little problem obtaining an exact answer to the question how many distinct elements appear in the stream. However, if the number of distinct elements is too great, or if there are too many streams that need to be processed at once (e.g., Yahoo! wants to count the number of unique users viewing each of its pages in a month), then we cannot store the needed data in main memory. There are several options. We could use more machines, each machine handling only one or several of the streams. We could store most of the data structure in secondary memory and batch stream elements so whenever we brought a disk block to main memory there would be many tests and updates to be performed on the data in that block. Or we could use the strategy to be discussed in this section, where we only estimate the number of distinct elements but use much less memory than the number of distinct elements.

đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2025 I Love Translation. All reserved.

E-mail: