互联网框架五层模型详解

注:机翻,未校对。

What is the Five Layers Model? The Framework of the Internet Explained 五层模型互联网框架解释

Computer Networks are a beautiful, amazing topic. Networks involve so much knowledge from different fields, from physics to algorithms.
计算机网络是一个美丽而神奇的话题。网络涉及来自不同领域的大量知识,从物理学到算法。

When dealing with Computer Networks, there is one framework that puts everything into place – and that is the layers model.
在处理计算机网络时,有一个框架可以将所有内容都放在适当的位置,这就是层模型。

In this post you’ll learn why we need layers, as well as what the five layers model is. You will also understand the role of each layer in this model.
在这篇文章中,您将了解为什么我们需要层,以及什么是五层模型。您还将了解此模型中每个图层的作用。

Layers? 为什么选择层?

Imagine you are given the task to design and implement the Internet! Where do you start? What do we actually want from a network, and an important one such as the Internet?
想象一下,你的任务是设计和实现互联网!你从哪里开始?我们实际上想从网络中得到什么,以及像互联网这样的重要网络?

Well, we actually want quite a lot of things. To name a few:
好吧,我们实际上想要很多东西。仅举几例:

  • We want it to be fast – that is, allow fast communication. We don’t want to wait long for a message to get from one host to another.
    我们希望它快速 - 也就是说,允许快速通信。我们不想等待很长时间才能将消息从一台主机发送到另一台主机。

  • It should also be reliable – when sending a message, we want the receiver to actually receive it.
    它也应该是可靠的——在发送消息时,我们希望接收者能够实际接收它。

  • The network should be extendable – that is, allow more devices to join. We wouldn’t want to start with two computers, and then not bee able to add a third one.
    网络应该是可扩展的,也就是说,允许更多的设备加入。我们不想从两台计算机开始,然后无法添加第三台计算机。

  • The network should support different devices and connections – it should be able to connect a wired PC, wireless laptop, and a cellphone, for example.-
    网络应该支持不同的设备和连接——例如,它应该能够连接有线 PC、无线笔记本电脑和手机。

And this is just a partial list.
这只是一个部分列表。

So, how do we go about implementing the internet when we want to achieve so many different things?
那么,当我们想要实现这么多不同的事情时,我们如何去实施互联网呢?

image-58

Computer Networks are complex
计算机网络是复杂的

In order to simplify things and make networks flexible, the communication is divided into layers.
为了简化事情并使网络灵活,通信被划分为几层。

Each layer has its own responsibility. It provides services to an upper layer, and uses services provided by a lower layer.
每一层都有自己的责任。它向上层提供服务,并使用下层提供的服务。

Consider an example network consisting of three devices:
考虑一个由三个设备组成的示例网络:

image-51

An example network with three devices
一个包含三台设备的示例网络

We have two layers:
我们有两个层次:

Layer Alpha is responsible for transmitting data between hosts that are directly connected to each other. In the diagram above, it’s between hosts A and B, or between hosts B and C.
Layer Alpha 负责在彼此直接连接的主机之间传输数据。在上图中,它位于主机 A 和 B 之间,或主机 B 和 C 之间。

Layer Beta is responsible for transmitting data between distant hosts. In the diagram, it’s between hosts A and C.
Layer Beta 负责在远程主机之间传输数据。在图中,它位于主机 A 和 C 之间。

What did we gain from this division? We gained a lot of flexibility.
我们从这次分层中得到了什么?我们获得了很大的灵活性。

Each layer can be developed and implemented by different people. The upper layer doesn’t care about the implementation of the lower layer, and vice versa.
每一层都可以由不同的人开发和实现。上层不关心下层的实现,反之亦然。

For instance, the connection between hosts A and B could be a WiFi connection, while the connection between B and C could consist of a carrier pigeon. These are (completely) different implementations of Layer Alpha.
例如,主机 A 和 B 之间的连接可以是 WiFi 连接,而 B 和 C 之间的连接可以由信鸽组成。这些是 Layer Alpha 的(完全)不同实现。

Notice that this way also enables us to have different specializations and expertise – an expert in training carrier pigeons does not necessarily have to be qualified at building solid WiFi network cards, or vice versa.
请注意,这种方式还使我们能够拥有不同的专业化和专业知识 —— 一个擅长训练信鸽的专家不一定需要在构建稳固的 WiFi 网卡上具备资质,反之亦然。

“Carrier pigeon” ,信鸽。在这里是一种比喻,用来表示一种不常见或老的通信方式。( 斐夷所非 注释

image-52

The Alpha Layer may have different implementations on the same network
Alpha 层在同一网络中可能有不同的实现

Developers of Layer Beta don’t need to bother themselves with this difference. At this layer, host A needs to know that in order to reach host C, it first needs to send his message to host B, rather than, say, host D. Then, host B will forward it to host C.
Layer Beta 的开发人员无需为这种差异而烦恼。在此层,主机 A 需要知道,为了到达主机 C,它首先需要向主机 B 发送消息,而不是向主机 D 发送消息。然后,主机 B 会将其转发给主机 C。

This way, Layer Beta is only responsible for finding the route to send the message. It uses the service provided by Layer Alpha – transmitting data between directly connected hosts.
这样,Layer Beta 只负责查找发送消息的路由。它使用 Layer Alpha 提供的服务——在直接连接的主机之间传输数据。

In general, networks are very complicated, and have various requirements. Dividing the communication into layers will allow us to simplify things and make communication more flexible.
一般来说,网络非常复杂,并且有各种要求。将沟通分成几层将使我们能够简化事情并使沟通更加灵活。

Now that you understand why we need layers, we can go on to learn about the layers that are actually used in networks.
现在您已经了解了我们为什么需要层,我们可以继续了解网络中实际使用的层。

What is the Five Layers Model? 什么是五层模型?

There have been a few layer models proposed along the years – most notably, the five layers model, the 7 layers model (aka OSI model), or the 4 layers model (aka the TCP/IP model).
多年来,已经提出了一些层模型,其中最著名的是五层模型、七层模型(又名 OSI 模型)或四层模型(又名 TCP/IP 模型)。
在这里插入图片描述

They are way more similar than different, and I choose to focus on the five layers model as it is the most practical of all – and best describes the way the Internet actually works.
它们的相似之处多于不同之处,我选择关注五层模型,因为它是最实用的,并且最能描述互联网的实际工作方式。

在这里插入图片描述

The First Layer – The Physical Layer 第一层 – 物理层

The first layer is responsible for transmitting a single bit – 0 or 1 – over the network.
第一层负责通过网络传输单个比特(0 或 1)。

To get some intuition as to what this layer is responsible for, consider the time of transmission. Assume that we have some kind of cable to transmit our data, and we use +5 Voltage to transmit 1, and -5 Voltage to transmit 0. What bits does the following diagram represent?
要获得有关该层负责什么的直觉,请考虑传输时间。假设我们有某种电缆来传输数据,我们使用 +5 电压传输 1,使用 -5 电压传输 0。下图表示哪些位?

image-53

A physical layer implementation encoding 1 as +5 Voltage and 0 as -5 Voltage

Well, it might be 1001. That is the case if it takes this long to transmit a single bit (demonstrated by the dashed orange line in the diagram below):
好吧,它可能是 1001。如果传输一个比特需要这么长时间(如下图中的橙色虚线所示),就是这种情况:

image-54

An example bitstream encoded by this signal

However, it might also represent other bit streams. For instance, if it only takes half the time to transmit a single bit (demonstrated by the dashed green line below), then the bit stream might be 11000011:
但是,它也可能表示其他位流。例如,如果传输一个比特只需要一半的时间(由下图的绿色虚线表示),则比特流可能是 11000011

image-55

Another possible bitstream encoded by the same signal

The difference lies in the time dedicated for transmitting a single bit. This is called the bitrate – that is, the number of bits that are conveyed per unit of time.
区别在于用于传输单个比特的时间。这称为比特率,即每单位时间传输的位数

Of course, achieving a high bitrate is preferable, as it means we can send many bits in a short timeframe. But it is hard to achieve high bitrates without getting many errors.
当然,实现高比特率是可取的,因为这意味着我们可以在短时间内发送许多比特。但是很难在不出现很多错误的情况下实现高比特率。

This is only one of the things that the first layer needs to take into consideration. The important thing for now is the goal of this layer: to transmit and receive a single bit.
这只是第一层需要考虑的事情之一。现在重要的是这一层的目标:发送和接收单个比特。

The Second Layer – The Data Link Layer 第二层 – 数据链路层

The second layer is responsible for transmitting data between two hosts that are directly linked, despite possible errors.
第二层负责在直接链接的两台主机之间传输数据,尽管可能存在错误。

What do we mean by “directly linked”? For now, imagine that there is no device in between the two devices. So, if we have two computers here – computer A and computer B, and they are connected via computer M – then computer A and computer B are NOT directly linked. But computer A and computer M are directly linked, and so are computer M and computer B.
我们所说的“直接链接”是什么意思?现在,假设两个设备之间没有设备。因此,如果我们这里有两台计算机——计算机 A 和计算机 B,并且它们通过计算机 M 连接——那么计算机 A 和计算机 B 不是直接链接的。但是计算机 A 和计算机 M 是直接链接的,计算机 M 和计算机 B 也是直接链接的。

image-56

Two remote hosts connected via another device

Another way to put it is that computer A and computer M are one hop away from one another, whereas computer A and computer B are two hops away.
另一种说法是,计算机 A 和计算机 M 彼此相距一跳,而计算机 A 和计算机 B 相距两跳。

That is, in order to get from computer A to computer B we need two “hops” – one hop from A to M, and another hop from M to B.
也就是说,为了从计算机 A 到计算机 B,我们需要两个“跃点”——一个从 A 跳到 M,另一个从 M 跳到 B。

image-57

Every direct connection is called a Hop

Going back to the second layer’s responsibility – we mentioned it is responsible for transmitting data between two hosts that are directly linked, despite possible errors.
回到第二层的职责——我们提到它负责在两个直接链接的主机之间传输数据,尽管可能存在错误。

What do we mean by errors? The physical layer might provide erroneous data. For example, 1 instead of 0. So a stream of bits such as 000110, might be received as 001110.
我们所说的错误是什么意思?物理层可能会提供错误的数据。例如,1 而不是 0。因此,像 000110 这样的位流可能被接收为 001110

Many reasons might cause these kind of errors. For instance, we can think of a truck literally running over the wire where the bits are transmitted, causing some problem. Regardless of the reason, the second layer must handle the communication despite these errors.
许多原因可能会导致此类错误。例如,我们可以想象一辆卡车从字面上碾过传输比特的电线,从而导致一些问题。无论出于何种原因,尽管存在这些错误,第二层仍必须处理通信。

The second layer sends data in datagrams, that is, in chunks. Datagrams in this layer are called Frames. Frames will usually contain MAC addresses, which are physical addresses, one identifying the sender, and another identifying the receiver.
第二层以数据报的形式发送数据,即以块的形式发送数据。此层中的数据报称为帧。帧通常包含MAC地址,这些地址是物理地址,一个标识发送方,另一个标识接收方。

Why would we need a MAC address?

为什么我们需要MAC地址?

First, the receiving devices would like to know whether the frame is intended for them. The receiver wouldn’t like to waste precious time reading data intended for someone else. If the frame contains a MAC address that doesn’t belong to a receiver’s device, that device can simply ignore this frame.
首先,接收设备想知道帧是否适合它们。接收者不想浪费宝贵的时间来读取用于其他人的数据。如果帧包含不属于接收器设备的 MAC 地址,则该设备可以简单地忽略此帧。

Second, for privacy reasons - we would like messages to arrive only at intended receivers, so only they can read the data.
其次,出于隐私原因 - 我们希望消息只到达预期的接收者,因此只有他们才能读取数据。

Third, the sender would like the receiver to know who sent the frame. That way, the receiver will be able to send their response back to the sender, and not to someone else.
第三,发送方希望接收方知道是谁发送了帧。这样,接收者将能够将他们的响应发送回发送者,而不是其他人。

Note that we would like these addresses to be unique. That is, we want one address to identify a single device. That way, we know that if we send a message to a specific address it will be sent to the intended device only.
请注意,我们希望这些地址是唯一的。也就是说,我们需要一个地址来标识单个设备。这样,我们知道,如果我们向特定地址发送消息,它只会发送到预期的设备。

The Third Layer – The Network Layer 第三层 – 网络层

The third layer is responsible for routing – that is, determining the path where the data will “travel”.
第三层负责路由,即确定数据将“传输”的路径。

You can think of this layer as the successful routing app, Google Maps. When you get in the car and use Google Maps, you tell the app your destination, and Google Maps finds out the best route for you to drive in.
您可以将此图层视为成功的路径应用程序 Google Maps。当你上车并使用谷歌地图时,你告诉应用程序你的目的地,谷歌地图就会为你找到最好的开车路线。

Notice that Google Maps is dynamic – it won’t necessarily pick the same route each time. Sometimes, one path will have a traffic jam, so Google Maps will prefer another route.
请注意,谷歌地图是动态的——它不一定每次都选择相同的路线。有时,一条路径会出现交通拥堵,因此谷歌地图会更喜欢另一条路线。

We said that the second layer has physical addresses, called MAC addresses. The third layer is responsible for logical addresses, such as IP addresses.
我们说第二层有物理地址,称为MAC地址。第三层负责逻辑地址,例如 IP 地址。

In this layer, datagrams are called packets.
在此层中,数据报称为数据包。

Consider the following network diagram:
请参考以下网络图:
image-59

A network diagram with Computer A in France, Computer B in the US, and 10 routers in between

We have two computers here – one in France, and one in the United States. Of course, they are not directly linked. Rather, they are linked via third layer devices called routers.
我们这里有两台电脑,一台在法国,一台在美国。当然,它们没有直接联系。相反,它们通过称为路由器的第三层设备进行链接。

Which layer is responsible for each connection?
哪个层负责每个连接?

Consider the connection between Computer A and Router 1. The second layer is responsible for this connection. Right, again, this is the second layer. The same applies for each connection between two directly linked devices.
考虑计算机 A 和路由器 1 之间的连接。第二层负责此连接。对,再说一遍,这是第二层。这同样适用于两个直接链接设备之间的每个连接。

What about the connection between Router 2 and Router 5?
路由器 2 和路由器 5 之间的连接情况如何?

The third layer is responsible for defining the route – that the message sent from Computer A to Computer B will go through Routers 1, 2, 5, 8 and 10, and not in another way.
第三层负责定义路由——从计算机 A 发送到计算机 B 的消息将通过路由器 1、2、5、8 和 10,而不是以其他方式。

Note that there may be different implementations for each layer. For instance, we may have different implementations of the second layer. So while the connection between computer A and Router 1 might be over an Ethernet cable, the connection between Router 1 and 2 might be wireless and use WiFi. The connection between Router 2 and Router 5 might use a carrier pigeon, while the connection between router 5 and 9 will also use WiFi.
请注意,每一层可能有不同的实现。例如,我们可能有不同的第二层实现。因此,虽然计算机 A 和路由器 1 之间的连接可能通过以太网电缆连接,但路由器 1 和路由器 2 之间的连接可能是使用无线 WiFi 的 。路由器 2 和路由器 5 之间的连接可能使用信鸽,而路由器 5 和 9 之间的连接也将使用 WiFi。
image-61

The second layer may be implemented differently on every link

The third layer does not care about these changes, but the second layer definitely does. If the carrier pigeon that transmits data from Router 2 to Router 5 is sick, the second layer will have to handle it. The data link layer will also have to make sure the data transmitted over the air between routers 1 and 5 is valid and without errors.
第三层不关心这些变化,但第二层肯定关心。如果将数据从路由器 2 传输到路由器 5 的信鸽生病了,则第二层将不得不处理它。数据链路层还必须确保路由器 1 和 5 之间通过无线传输的数据有效且没有错误。

Interim Summary 中期摘要

So far we have covered three of the five layers. To recap:
到目前为止,我们已经涵盖了五层中的三层。 回顾一下:

  • The physical layer is responsible for transmitting a single bit, 1 or 0, over the network.
    物理层负责通过网络传输单个位 10

  • The data link layer is responsible for transmitting data between directly linked devices, that is – devices connected via a single hop.
    数据链路层负责在直接链接的设备之间传输数据,即通过单跳连接的设备。

  • The third layer is responsible for transferring data between hosts that are connected via multiple hops. It determines the route, the path that the packets will travel.
    第三层负责在通过多个跃点连接的主机之间传输数据。它决定了路由,即数据包将经过的路径。

The Fourth Layer – The Transportation Layer 第四层 – 运输层

The fourth layer is an end-to-end layer. That is, it is responsible for communication from the source, all the way to the ultimate destination.
第四层是端到端层。也就是说,它负责从源头一直到最终目的地的通信。

It allows multiplexing of multiple services. For example, one server may serve as a Web server, as well as a Mail server. When a client turns to that server, the client should be able to specify which service it would like to access. While the third layer specifies the address of the server, the transport layer identifies which service is relevant for the current communication.
它允许多个服务的多路复用。例如,一台服务器既可以用作 Web 服务器,也可以用作邮件服务器。当客户端转向该服务器时,客户端应该能够指定它要访问的服务。第三层指定服务器的地址,而传输层则标识与当前通信相关的服务。

In addition, the transport layer may ensure reliability. So when this layer receives data from the upper layer, it splits it into chunks, sends them, and makes sure that all those chunks arrive correctly at the other end.
此外,传输层可以确保可靠性。因此,当这一层从上层接收数据时,它会将其拆分为块,发送它们,并确保所有这些块都正确到达另一端。

Notice that the network layer is usually not reliable. Packets may arrive in incorrect order, they can arrive with incorrect data, or even not arrive at all. A reliable transportation layer makes sure that the data is correctly received.
请注意,网络层通常不可靠。数据包可能以不正确的顺序到达,它们可能以不正确的数据到达,甚至根本没有到达。可靠的传输层可确保正确接收数据。

In this layer, datagrams are called segments.
在此层中,数据报称为段。

Consider the following network diagram once more:
再次参考以下网络图:
image-59

Which layer is responsible for what?

各层负责什么?

We have already said that the network layer is responsible for the route, that is, the path in which the packets travel. We also mentioned that the second layer is responsible for the transmission of the data between two, directly connected devices. For example, the link between Router 1 and Router 2.
我们已经说过,网络层负责路由,即数据包传输的路径。我们还提到,第二层负责在两个直接连接的设备之间传输数据。例如,路由器 1 和路由器 2 之间的链路。

The fourth layer views all of this network diagram as an abstract cloud. It doesn’t know the routers, and it doesn’t care about the structure of the network, or the routing. It assumes that the network can send a packet from one end to another:
第四层将所有这些网络图视为一个抽象的云。它不知道路由器,也不关心网络的结构或路由。它假设网络可以从一端向另一端发送数据包:
image-62

The fourth layer sees the network as an abstract cloud

The transportation layer makes sure that the endpoints can communicate over different services – for example, web and email. In addition, it might make sure that the connection is reliable.
传输层确保端点可以通过不同的服务(例如 Web 和电子邮件)进行通信。此外,它可以确保连接可靠

One example would be to acknowledge every received segment. For instance, when computer A sends a segment to computer B, computer B will send a special Acknowledgement segment, announcing that it has received the packet.
一个示例是确认每个收到的段。例如,当计算机 A 向计算机 B 发送分段时,计算机 B 将发送一个特殊的确认分段,宣布它已收到数据包。

The Fifth Layer – The Application Layer 第五层 – 应用层

Last but definitely not least, we have the fifth layer, or Application Layer. This layer provides the service to the user’s application – web service, Voice over IP (VoIP), network games, streaming, and so on.
最后但并非最不重要的一点是,我们有第五层,或应用层。此层为用户的应用程序提供服务 - Web 服务、IP 语音 (VoIP)、网络游戏、流媒体等。

According to the layers model, the fifth layer doesn’t care at all about the network. It relies on the fourth layer, as well as the lower layers, to transmit the data from one endpoint to another. The fifth layer will use this service for the various needs of the application.
根据层模型,第五层根本不关心网络。它依赖于第四层以及更低的层,将数据从一个端点传输到另一个端点。第五层将使用此服务来满足应用程序的各种需求。

Different protocols will be used for different applications. For instance, HTTP protocol is commonly used for serving web pages on the World Wide Web. SMTP is a protocol used for emails, FTP for exchanging files, and there are many, many more.
不同的协议将用于不同的应用。例如,HTTP协议通常用于在万维网上提供网页。SMTP是一种用于电子邮件的协议,用于交换文件的FTP,还有很多很多。

Summary 总结

In this post you learned what the five layers model is and why we need layers. You should now understand what each layer is responsible for, and you can fit every topic you encounter in Computer Networks into this model.
在这篇文章中,您了解了什么是五层模型以及为什么我们需要层。现在,您应该了解每一层负责什么,并且可以将计算机网络中遇到的每个主题都放入此模型中。


via: Omer Rosenbaum OCTOBER, 2022

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/38803.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

[数据集][目标检测]城市街道井盖破损未盖丢失检测数据集VOC+YOLO格式4404张5类别

数据集格式:Pascal VOC格式YOLO格式(不包含分割路径的txt文件,仅仅包含jpg图片以及对应的VOC格式xml文件和yolo格式txt文件) 图片数量(jpg文件个数):4404 标注数量(xml文件个数):4404 标注数量(txt文件个数):4404 标注…

昇思25天学习打卡营第03天 | 张量 Tensor

昇思25天学习打卡营第03天 | 张量 Tensor 文章目录 昇思25天学习打卡营第03天 | 张量 Tensor张量张量的创建张量的属性Tensor与NumPy转换稀疏张量CSRTensorCOOTensor 总结打卡 张量 张量(Tensor)是一种类似于数组和矩阵的特殊数据结构,是神经…

MATLAB|更改绘图窗口的大小和位置

MATLAB绘图 plot、plot3、cdfplot都适用 效果 如下图,运行程序后可以直接得到这两个绘图窗口。 右上角的Figure1是原始图片,右下角的Figure2是调整了位置和大小后的绘图窗口。 完整源代码 % 绘图大小和位置调整 % Evand©2024 % 2024-7-1/Ver1…

Transformer模型原理细节解析

基本原理: Transformer 的核心概念是 自注意力机制(Self-Attention Mechanism),它允许模型在处理每个输入时“关注”输入序列的不同部分。这种机制让模型能够理解每个单词或符号与其他单词或符号之间的关系,而不是逐个地线性处理输入。 Transformer 主要由两个部分组成:…

手把手教你搭建PyTorch环境:MindStudio中PyTorch模型开发实战

本次实验的视频链接如下:​https://www.bilibili.com/video/BV1iA4y1f7o1/ 本次实验在MindStudio上进行,请先按照 教程 配置环境,安装MindStudio。 ​ MindStudio的是一套基于华为自研昇腾AI处理器开发的AI全栈开发工具平台,该IDE上功能很多…

ESOP 系统助力电子设备公司的管理模式升级

在科技飞速发展的时代,电子设备行业竞争愈发激烈,企业要想在市场中立足并持续发展,不断升级管理模式成为关键。ESOP系统的引入,为电子设备公司带来了全新的机遇,有力地推动了管理模式的升级。 ESOP 系统首先为电子设备…

element el-table表格切换分页保留分页数据+限制多选数量

el-table表格并没有相关的方法来禁用表头里面的多选按钮 那么我们可以另辟蹊径&#xff0c;来实现相同的多选切换分页&#xff08;保留分页数据&#xff09; 限制多选数量的效果 <el-table:data"tableData"style"width: 100%">// 不使用el-talbe自带…

农村程序员陈随易2024年中总结

今天是 2024年7月1日&#xff0c;时间如白驹过隙&#xff0c;今年已去其一半。 总结一下今年上半年的情况&#xff0c;给大家提供一些参考和建议。 希望大家关注一下公众号 陈随易&#xff0c;有些内容只在公众号发表。 先看看我的年初计划&#xff0c;这个在今年年初的时候&…

泛微E9开发 限制明细表列的值重复

限制明细表列的值重复 1、需求说明2、实现方法3、扩展知识点3.1 修改单个字段值&#xff08;不支持附件类型&#xff09;3.1.1 格式3.1.2 参数3.1.3 案例 3.2 获取明细行所有行标示3.2.1 格式3.2.2 参数说明 1、需求说明 限制明细表的“类型”字段&#xff0c;在同一个流程表单…

【全网首发】双字重叠语序验证码识别

【省流&#xff1a;打算直接测试效果的可以访问这个网址】 http://decaptcha.ai?project_namenetease_zh_overlap 【实现方案】 如图所示&#xff0c;我们能看到&#xff0c;比起以往的“单个字”语序点选&#xff0c;这个验证码的难点在于“重叠汉字“&#xff0c;我们知道…

【Python机器学习】模型评估与改进——简单的网格搜索

为了提升模型的泛化性能&#xff0c;我们可以通过调参来实现。 在尝试调参之前&#xff0c;重要的是理解参数的含义&#xff0c;找到一个模型的重要参数&#xff08;提供最佳泛化性能的参数&#xff09;的取值是一项棘手的任务&#xff0c;但对于几乎所有模型和数据集来说都是…

API-Window对象

学习目标&#xff1a; 掌握Window对象 学习内容&#xff1a; BOM&#xff08;浏览器对象模型&#xff09;定时器-延时函数JS执行机制location对象navigation对象history对象 BOM&#xff08;浏览器对象模型&#xff09;&#xff1a; BOM是浏览器对象模型。 window对象是一个全…

Windows 11的市场份额越来越大了,推荐你升级!

7月1日&#xff0c;系统之家发布最新数据&#xff0c;显示Windows 11操作系统的市场份额正在稳步上升。自2021年10月Windows 11发布以来&#xff0c;Windows 10一直占据着市场主导地位&#xff0c;当时其市场份额高达81.44%。然而&#xff0c;随着时间的推移&#xff0c;Window…

鸿蒙学习1:ArkTS基础入门

1 变量和常量 1.1 变量 常见的基础数据类型&#xff1a; string 字符串、number 数字、boolean布尔 判断。 变量&#xff1a;专门用来存储数据的容器。 语法&#xff1a;let 变量名: 数据类型 值。例如&#xff1a;let name: 张三;let price:number 12.4; let isSuccess …

昂科烧录器支持BPS晶丰明源半导体的多相Buck控制器BPD93004E

芯片烧录行业领导者-昂科技术近日发布最新的烧录软件更新及新增支持的芯片型号列表&#xff0c;其中BPS晶丰明源半导体的多相Buck控制器BPD93004E已经被昂科的通用烧录平台AP8000所支持。 BPD93004E是一款多相Buck控制器&#xff0c;支持原生1~4相&#xff0c;数字方式控制&am…

科普文:一文搞懂jvm原理(二)类加载器

概叙 科普文&#xff1a;一文搞懂jvm(一)jvm概叙-CSDN博客 前面我们介绍了jvm&#xff0c;jvm主要包括两个子系统和两个组件&#xff1a; Class loader(类装载器) 子系统&#xff0c;Execution engine(执行引擎) 子系统&#xff1b;Runtime data area (运行时数据区域)组件&am…

学习笔记(linux高级编程)9

void pthread_cleanup_push(void (*routine)(void *)&#xff0c; void *arg); 功能&#xff1a;注册一个线程清理函数 参数&#xff0c;routine&#xff0c;线程清理函数的入口 arg&#xff0c;清理函数的参数。 返回值&#xff0c;无 void pthread_cleanup_pop(int execute)…

Perl语言入门指南

一、绪论 1.1 Perl语言概述 1.2 Perl的特色 1.3 Perl面临的问题 1.4 Perl语言的应用领域 二、Perl语言基础 2.1 Perl语言的历史发展 2.2 Perl语言的基本语法 2.3 Perl语言的数据类型 三、Perl语言控制结构 3.1 条件语句 3.2 循环结构 3.3 函数和子程序 四、Perl语…

OpenStack开源虚拟化平台(一)

目录 一、OpenStack背景介绍&#xff08;一&#xff09;OpenStack是什么&#xff08;二&#xff09;OpenStack的主要服务 二、计算服务Nova&#xff08;一&#xff09;Nova组件介绍&#xff08;二&#xff09;Libvirt简介&#xff08;三&#xff09;Nova中的RabbitMQ解析 OpenS…

MySQL-数据操作类型的角度理解 S锁 X锁

文章目录 1、S锁和S锁互相兼容2、S锁和X锁互斥3、X锁和X锁也互斥4、X锁和S锁也互斥5、select * from account for update;6、select * from account for update nowait;7、select * from account for update skip locked; 1、S锁和S锁互相兼容 2、S锁和X锁互斥 3、X锁和X锁也互…