Monthly progress summary July 1st ~ July 22nd

Two-thirds of a month has passed, and I feel that I have learned a lot in school this month. It is also the most fulfilling three weeks. Among them, I was in a daze, and I also regretted it. Why is my state so bad today? I learned this. But there is also the joy of learning knowledge. In short, I realized many of my own shortcomings and found a relatively correct learning direction.

Learning content Read books, brush inscriptions, write blogs, watch java videos.

Books: I also read the "Top-Down Method" of computer networks. The book is very good. Now I will read the second chapter of "In-depth Understanding of Computer Systems" about operating systems. This book is really boring, and it is very thick, so I can only take it slowly.

 The specific content of the book: There are too many contents, so let’s briefly summarize the key points

Chapter 1 Computer Networks and the Internet

ISP, the full name of Internet Service Provider, is an Internet service provider, which is a business organization that provides Internet access services. ISPs provide various forms of services, including broadband access for individuals' homes, Internet access for companies, virtual private networks (VPNs), hosting services, and more.

The main functions of an ISP include:

  1. Providing Internet Access : This is the main function of an ISP, which provides Internet access services through various means (such as dial-up, DSL, fiber optic, satellite, etc.).

  2. Providing related services : In addition to Internet access, many ISPs also provide other services such as email, web hosting, cloud storage, and more.

  3. IP address allocation : ISPs are responsible for allocating IP addresses to users, which is one of the key factors for users to be able to surf the Internet.

  4. Domain name resolution : ISPs usually also run DNS servers to help users with domain name resolution and convert URLs into actual IP addresses.

  5. Data transmission : ISPs are responsible for transmitting user data to other networks and servers around the world through their extensive network infrastructure.

ISP can be divided into different levels according to scale and service objects:

  • Tier 1 ISP (Tier 1 ISP) : These ISPs have network infrastructure all over the world and can directly access all network areas in the world without going through other ISP networks.

  • The second-tier ISP (Tier 2 ISP) : These ISPs have part of their own network infrastructure, but in some areas may need to access the Internet through an interconnection agreement with the first-tier ISP.

  • The third-tier ISP (Tier 3 ISP) : These ISPs usually mainly serve local users, and they usually need to access the Internet through the interconnection agreement with the second-tier or first-tier ISP.

ISPs play an important role in building the global network structure of the Internet. They connect networks around the world through Internet protocols and routing protocols, making the Internet a global network.

China's telecom operators, such as China Mobile, China Unicom, and China Telecom, are generally considered Tier 1 ISPs. These companies have their own large-scale network infrastructure and connect various cities and regions in China, as well as connection points with the rest of the world, through technologies such as Internet Protocol (IP) and Multiprotocol Label Switching (MPLS).

These companies independently manage and control their networks, and their networks cover most of China, enabling their users to directly access the Internet. In addition, they also enable their users to access the global Internet through Internet protocols with other first-tier ISPs.

However, it's worth noting that the term "Tier 1 ISP" may have different definitions in different contexts. In some definitions, only those ISPs that are able to interconnect directly with all other Tier 1 ISPs without paying peering fees are considered Tier 1 ISPs. Under this definition, only a handful of ISPs worldwide are considered Tier 1 ISPs.

Chapter 2 Application Layer

When learning DNS, it is always regarded as an address resolution protocol, but it is actually a domain name query and transmission protocol. ARP is address resolution protocol

The details are: Link to this article: Detailed explanation of DNS function is not called Address Resolution Protocol_Haohao's Blog-CSDN Blog

There is also a socket, which is not very clear now

Socket (Socket) is an abstract concept in computer network, which is used to describe the network connection between two network nodes (for example, two computers). It provides a way to exchange data on the network, so that different computers can communicate with each other.

In programming, a socket usually refers to a programming interface that provides network services or connects to network services. It is often used to implement various network protocols, such as TCP, UDP, etc.

The main functions of sockets are as follows:

  1. Establish a network connection : A socket can establish a network connection between two computers so that data can be transmitted between the two computers.

  2. Data Transfer : Sockets provide methods for sending and receiving data. After the network connection is established, you can use sockets to send data, and you can also receive data from the other party.

  3. Network programming : Sockets are the basis of network programming. Whether you want to create a web server, or you want to create a chat program, you will need to use sockets.

Link to this article: Use of sockets - Haohao's Blog - CSDN Blog

Chapter 3 Transport Layer

Link to this article: The role of IP TCP UDP_Haohao's Blog-CSDN Blog

Link to this article:

Detailed explanation of TCP UDP segment - Haohao's Blog - CSDN Blog

It would be a waste of time not to write Chapter 4. . . I am going to open a collection alone for this summer vacation. . .

writing a key 

When you send a QQ message to your classmates on your computer:

  1. Application layer - QQ software : First, you enter a message in the chat window of QQ and click send. QQ software encapsulates your message, which may include adding some metadata, such as sender and receiver information, message timestamp, etc., and then uses a certain protocol (such as HTTP or Tencent's own proprietary protocol) to send the encapsulated message to the server.

  2. Transport layer - TCP/UDP : QQ software sends the encapsulated data to the network module of the operating system. At this stage, the data is sliced ​​into individual packets, and each packet is appended with a header containing information such as destination and source IP addresses, destination and source port numbers, and so on. QQ may choose TCP or UDP for data transmission according to the actual situation. TCP provides a reliable data transmission method that ensures that all data packets can reach the destination in order, while UDP is a connectionless protocol that does not guarantee that the data packets can reach the destination when sending data packets.

  3. Network Layer - IP : This layer is mainly responsible for sending data packets to the destination IP address. Your computer will first look at the destination IP address of the packet, and if the destination IP address is not on the same network as your computer's IP address, the packet will be sent to your default gateway (usually your router).

  4. Link Layer - Ethernet/Wi-Fi : This layer is responsible for sending data packets from your computer to the router. If your computer is connected to the router via Wi-Fi, the data packets will be sent over radio waves; if your computer is connected to the router via an Ethernet cable (network cable), the data packets will be sent over the wires.

  5. Physical Layer - Wires/Radio Waves : At this layer, packets of data are converted into signals that can be transmitted over a physical medium such as wires or radio waves. For example, if your computer is connected to a router with an Ethernet cable, the packets of data are converted to electrical signals and sent over the wire; if your computer is connected to the router with Wi-Fi, the packets of data are converted to radio signals and sent over the air.

  6. Router : After the router receives the data packet sent by your computer, it will look at the destination IP address of the data packet and use the routing table to determine how to send the data packet to the destination IP address. A router might send the packet to another router, or directly to your ISP.

  7. ISP - Internet Service Provider : The data packets pass through your ISP's network, through a series of routers and switches, and finally reach the network where the QQ server is located.

  8. QQ server : The server receives the data packet, and then reassembles the data packet into the original message. Then, the server will send the message to your classmates' QQ clients.

  9. Your classmate's QQ client : Your classmate's QQ client receives the message and displays it in the chat window.

 

Brushing up questions: I brushed up my questions for the past six months in the past few weeks. Why didn’t I brush up on the questions before? 

        Leedcode has been brushed from the 11th to today, and the daily question has not been interrupted. If there is no accident, I will read it every day until I find a job. Sometimes I read a question every day, not to learn a knowledge point, but to develop a good habit.

 

 Probably brushed about 41 questions! But the summary is not very good, and you may still not be able to write the same type of questions.

Pay attention to this later!

52. N Empress II    

Loop plus backtracking, traverse each point, and backtrack. If the point meets the condition, the point is initialized to Q, and when Q is n, it is NL++;

class Solution {
public:
    int totalNQueens(int n) {
    vector<string> res(n,string(n,'.'));
    int NL=0;
    slove(res,0,n,NL);
    
    return NL;   
    }
void slove(vector<string>&res,int level,int n,int &NL)
{
        if(level==n)
        {
        NL++;
        return ;       
        }
        for(int i=0;i<n;i++)
        {
            if(slove1(res,level,i))
            {
                res[level][i]='Q';
                slove(res,level+1,n,NL);
                res[level][i]='.';
            }
        }
}
bool slove1(const vector<string>&res,int i,int j)
{       int  num=res.size();
         for(int n=0;n<num;n++)
        {
            if(res[n][j]=='Q')
            {
                return  false;
            }
        }
        for (int a=i,b=j;a>=0&&b>=0;a--,b--)
        {
            if(res[a][b]=='Q')
            return false;
        }        
        for(int a=i,b=j;a>=0&&b<num;a--,b++)
        {
            if(res[a][b]=='Q')
            return false;
        }
        return true;
}
    
};

write a blog

The blogs written in the past few weeks have caught up with the sum of what I wrote before, and I have written nearly 30 articles, hahaha but I don’t know why no one reads them! why? ? ? Did I write too watery?

On the contrary, the points have increased a lot and have caught up with the sum of the past. Hahaha

 It's the first place that took a small place here 

4 Also, when I am bored, I will watch the basic video of java. When we were in junior year, we seemed to have a java course.

 This java is interesting and easy to use to relieve boredom, and I will watch a video in a short while. I said java, you can do it for yourself, I want to fall into the arms of c++.

 

Finally, keep going!

 

Guess you like

Origin blog.csdn.net/qq_64200765/article/details/131869290