20210224 Computer Science Crash Course 40 episodes (26-30)

Station B address
26. Graphical user interface:
27. 3D graphics: Introduction to 3D modeling and rendering algorithms.
Computer Networks: (1) Networks formed by computers at close range are called Local Area Networks, or LANs for short, the most famous of which is Ethernet. (2) In order to facilitate the accurate transmission of information between users, Ethernet requires each computer to have a unique media access control address, referred to as MAC address. This unique address is placed in the header and sent to the network as the prefix of the data, so the computer You only need to monitor the Ethernet cable, and only when you see your own MAC address, can you process the data. Every computer manufactured now comes with its own unique MAC address (to be precise, each network card has its own unique address. How many modern computers can Network cards). (3) Multiple computers share a medium. This method is called "Carrier Sense Multiple Access", or CSMA for short. Carrier refers to the shared medium for transporting data. The carrier of Ethernet is copper wire, and the carrier of Wifi is the air that propagates radio waves. The rate at which the carrier transmits data is called Bandwidth. Unfortunately, using a shared carrier has a big drawback. When the network traffic is small, the computer can wait for the carrier to be emptied and then transmit data. However, as the network traffic increases, the probability that two computers want to write data at the same time will also Rising, this is called Collision, the data is messed up, just like two people talking on the phone at the same time. Fortunately, the computer can detect these conflicts by monitoring the signals in the wires. The most obvious solution is to stop the transmission, wait for the network to be idle, and retransmit, while giving each conflicting transmission a sequential time delay. If there is a conflict again, then Delay again. This method of exponentially increasing the waiting time is called Exponential Backoff, which is used by Wifi in Ethernet, and it is also used by many other transmission protocols. (4) In order to reduce conflicts and improve efficiency, we need to reduce the number of devices in the same carrier. The carrier and the devices in it are collectively referred to as "Collision
29. Internet: The computer is connected to the local area network LAN, and a router controls a local area network. The local area network is connected to the wide area network WAN. The WAN router generally belongs to your "Internet Service Provider" Internet Service Provider, or ISP for short, and is generally a network operator. In a wide area network, first connect to a regional router. This router may cover a block, and then connect to a larger WAN, which may cover a city, and may jump several times, and eventually reach the Internet backbone. The Internet backbone consists of a group of very large A router with ultra-high bandwidth. In order to get the video from YouTube, the data packet must first reach the Internet backbone, and then follow the backbone to the YouTube server with the corresponding video file. The data packet may have to jump from your computer to the YouTube server. 10 times, first jump 4 times to the Internet backbone, 2 times through the backbone, the backbone may jump 4 times, and then to the YouTube server. IP (Internet Protocol) is a very low-level protocol. The header of the data packet has a target address, and the header stores data about the data, also called metadata. This means that when the data arrives at the other party’s computer, the other party does not know how to deliver the packet. For which program is it skype or Call of Duty, it is necessary to develop more advanced protocols on top of IP. Among these protocols, the simplest and most common is User Datagram Protocol, or UDP. UDP also has a header. This header is located before the data. The header contains useful information. One of the information is the port number. Every program that wants to access the network must apply for a port number from the operating system. When a data packet arrives , The receiver's operating system will read the UDP header, read the port number inside, and match the corresponding program. In summary, IP is responsible for sending data packets to the correct computer, and UDP is responsible for sending data packets to the correct program. There is also a "checksum" in the UDP header, which is used to check whether the data is correct. The check method is to sum the data to compare. After knowing that the data is damaged, the data is generally thrown away. And UDP has no way of knowing whether the data has arrived. Therefore, the video may freeze, indicating that there is data loss. Obviously, the UDP protocol is not suitable for transmitting content that must be delivered in full, such as mail. If "all data must arrive", useTransmission Control Protocol, TCP for short. Like UDP, the header is also in front of the data, so people call this combination TCP/IP. Like UDP, the TCP header also has a "port number" and a "checksum", but TCP has more advanced functions. (1) TCP data packets have sequence numbers, which enable the receiver to arrange the data packets in the correct order, even if the arrival time is different. (2) TCP requires the receiver's computer to receive the data packet and after the "checksum" check is correct (the data is not damaged), a confirmation code is sent to the sender to indicate that it has been received. The confirmation code is abbreviated as ACK. After knowing that the previous data packet arrives successfully, the sender will send the next data packet. If the confirmation code is not received after this time, then something must be wrong. If the confirmation has not been received for a period of time Code, the sender will send it again. TCP can send multiple packets at a time, which improves efficiency and does not waste time waiting for confirmation codes. The success rate of the confirmation code and the round-trip time can infer the degree of network congestion. TCP uses this information to adjust the number of packets sent to solve the congestion problem. Simply put, TCP can handle out-of-sequence and lost data packets, retransmit if they are lost, and adjust the transmission rate according to the degree of congestion. The biggest disadvantage of TCP is that the number of "confirmation code" packets doubles, but no more information is transmitted. Sometimes this price is not worthwhile, such as online shooting games. When a computer visits a website, it needs two things: IP and port number. For example, 172.217.7.238:80 port, this is Google’s IP address and port number. Enter the above IP and port number to enter the Google website. You can visit the website with an IP and port number, but memorizing a long series of numbers is annoying. google.com is easier to remember than a long series of numbers, so the Internet has a special service that is responsible for one-to-one correspondence between IP addresses and domain names, just like the Internet The "phone book" is called the Domain Name System Domain Name Systerm, or DNS for short. The working principle of DNS is that when you enter the domain name in the browser, the browser will ask the DNS server what its IP address is. Generally, the DNS server is provided by the Internet provider, and the DNS will look up the table. If the domain name exists, it will return the corresponding IP address. Nowadays, there are 3000w registered domain names, so for good management, DNS is not stored as a long list, but as a tree structure. Top Level Domain, referred to as TLD, is at the top, such as .com and .gov. The next level is the second-level domain name, such as google.com under .com. The next level is called Sub-Domain, such as images. google.com. The 3000w mentioned earlier is a second-level domain name, not a subdomain name. Open system interconnection reference model Open Systerm Interconnection referred to as OSI, the bottom 5 layers: PHYSICAL LAYER (electrical signals in the circuit, wireless signals in the wireless network)-data link layer DATA LINK LAYER (responsible for controlling the physical layer, including media Access control address MAC, collision detection, exponential backoff and some other underlying protocols)-network layer NETWORK LAYER (responsible for various message exchanges and routing)-transport layer TRANSPORT LAYER (such as UDP, TCP these protocols, responsible for carrying out between computers Point-to-point transmission, and will detect and repair errors)-session layer SESSION LAYER (session layer will use TCP, UDP to create a connection, transfer information, and then close the connection, this whole set is called a session)
30. The World Wide Web: The World Wide Web and the Internet are not the same thing. The World Wide Web runs on the Internet, and there are also programs such as skype and Instagram running on the Internet. The Internet is a channel for transmitting data, and various programs are used. Among them, the World Wide Web is the most transmitted data, which is distributed on millions of servers around the world. You can use the browser Browsers to access the World Wide Web. The most basic unit of the World Wide Web is a single page, which has content and links to other pages, called Hyperlinks . You can click on text or pictures to reach another link. These hyperlinks form a huge Internet. This is the origin of the World Wide Web. . Before the hyperlink appeared, every time the computer wanted to see other information, it needed to find it in the file system or type the address into the search box. With the hyperlink, you could freely switch between related subjects. Text hyperlinks are also called hypertext hypertext . Nowadays, the hypertext points to another web page, and the web page is rendered by the browser. In order to connect web pages to each other, each web page needs a unique address, which is called Uniform Resource Locator, or URL for short. For example, thecrashcourse.com/courses. When you visit a website, the computer first does a DNS lookup. The DNS lookup is a domain name, such as thecrashcourse.com. DNS will enter the corresponding IP address. With the IP address, your browser will open a TCP connection to This IP address, this address is running the web server, and the standard port of the web server is port 80. At this time, your computer is connected to the thecrashcourse.com server. The next step is to request the courses page from the server. Hypertext Transfer Protocol, HTTP for short will be used here ., HTTP only had the GET command at the earliest. We send the GET/courses command to the server. The command is sent to the server in ASCII code. The server will return the webpage corresponding to the address, and then the browser will render it on the screen. If the user clicks another link , The computer will resend the GET command, and this step will be repeated continuously when you browse the website. In later versions, HTTP added a status code, which is placed in front of the request. For example, the status code 200 represents "Webpage found, here you", and the status code 400-499 represents client-side errors, such as a 404 webpage does not exist. Hypertext is stored and sent in the form of text, for example, the encoding may be ASCII or UTF-16. Because if there is only plain text, it is impossible to indicate what is a link and what is not a link, so it is necessary to develop a marking method. Therefore, the Hypertext Markup Language, or HTML for short , was developed . The earliest HTML has 18 instructions. Using these instructions, we can make web pages. We enter h1 to represent the first-level title, and then enclose it with <>. <h1>
This is an HTML tag, and then enter the desired title. We don't want a whole page to be a title, so we add it as a closing tag.

<h1>Ode to Worf</h1>

We use <a>tags to make hyperlinks. It has an href attribute indicating where the link points to. When the link is clicked, it will enter that webpage, and finally use the </a>close tag.

<a href=http://www.kli.org>Klingon</a>

Next, use <h2>tags as secondary headings.

<h2>Why is he so awesome?</h2>

HTML also has tags for making lists. We first write <ol>an ordered list that represents an ordered list, and then if we want to add a few list items, we just add a few, just <li>wrap it up.

<ol>
<li>Super Strong</li>
<li>Very Loyal</li>
<li>Good Friend</li>
<li>Amazing with <a href=http://en.wikipedia.org/wiki/Bat'leth>Bat'leth</a></li>
</ol>

Readers may not know what Bat'leth is, so add a hyperlink. Finally, in order to maintain a good format, </ol>end with a representative list. This completes a simple web page. If you save these texts in Notepad or a text editor, and then name the file "test.html", you can drag it into the browser to open it.
Today's HTML is a bit more complicated. The latest version of HTML and HTML5 has more than 100 kinds of tags, including icon tags, table tags, form tags, button tags, etc., as well as other related technologies, such as Cascading Style Sheet, or CSS for short . JavaScript , these two can be added to web pages to do more powerful things.
The web browser can communicate with the web server. The browser not only obtains web pages and media, but also displays them after obtaining them. The World Wide Web has open standards, and everyone can develop new servers and new browsers.
At first, in order to effectively search for information, people created a directory and linked to other websites, such as Yahoo. Later, the manually edited directory became inconvenient, so a search engine was developed.
The earliest search engine has 3 parts. One is a crawler web crawler, a software that runs around with links. Whenever you see a new link, it is added to its own list; the second part is an expanding index that records the visits. What words have appeared on the web page, the last part is the search algorithm of the query index. For example, when searching for cat, every webpage with the word cat will appear. Early search engine rankings are very simple, depending on the number of times the search term appears on the page. At first it was OK, but later someone took advantage of the loopholes and wrote hundreds on the page. A cat to attract people. A big reason for Google's fame is that it created a clever algorithm to circumvent this problem. Instead of trusting the content on the website, search engines will see if other websites are linked to this website, and citations represent the quality of the website.
NET NEUTRALITY, to put it simply, all packets should be treated equally, no matter if this packet is my email, or the speed and priority of the video you are watching, it should be the same, but many companies will be happy to prioritize their data Arrivals. If network neutrality is broken, network operators, as information gatekeepers, have a strong incentive to crush their opponents. Large companies like Netflix and Google can spend money to buy privileges, while small companies are at a disadvantage.

Guess you like

Origin blog.csdn.net/foundliving/article/details/114006542