CN116846977A - Network sharing method and device, system, electronic equipment and storage medium - Google Patents
Network sharing method and device, system, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116846977A CN116846977A CN202210293935.8A CN202210293935A CN116846977A CN 116846977 A CN116846977 A CN 116846977A CN 202210293935 A CN202210293935 A CN 202210293935A CN 116846977 A CN116846977 A CN 116846977A
- Authority
- CN
- China
- Prior art keywords
- central processor
- processing unit
- central processing
- communication module
- shared data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
技术领域Technical field
本公开涉及计算机技术领域,尤其涉及一种网络分享方法及装置、系统、电子设备和存储介质。The present disclosure relates to the field of computer technology, and in particular, to a network sharing method and device, system, electronic equipment and storage medium.
背景技术Background technique
随着科学技术的发展,电子设备已经成为人们日常生活中必不可少的工具。例如,用户可以通过电子设备中操作系统上运行的应用程序访问各种各样的网络资源。但是,当电子设备内部存在多核心非对称硬件时,某一处理器不具备网卡能力时,用户无法通过该处理器所控制的应用程序访问网络资源。因此,如何使不具备网卡能力的处理器具备联网功能成为人们关注的重点。With the development of science and technology, electronic devices have become indispensable tools in people's daily lives. For example, users can access a variety of network resources through applications running on the operating system in electronic devices. However, when there are multi-core asymmetric hardware inside the electronic device and a certain processor does not have network card capabilities, users cannot access network resources through applications controlled by the processor. Therefore, how to enable processors without network card capabilities to have networking capabilities has become a focus of attention.
发明内容Contents of the invention
本公开提供了一种网络分享方法及装置、系统、电子设备和存储介质,主要目的在于提高网络分享的便利性。The present disclosure provides a network sharing method, device, system, electronic device and storage medium, with the main purpose of improving the convenience of network sharing.
根据本公开的一方面,提供了一种网络分享方法,应用于第一中央处理器,所述第一中央处理器未设置物理网卡,包括:According to one aspect of the present disclosure, a network sharing method is provided, which is applied to a first central processor without a physical network card, including:
通过所述第一中央处理器所控制的应用程序获取数据传输指令;Obtain data transmission instructions through an application program controlled by the first central processor;
获取所述数据传输指令对应的套接字和所述数据传输指令对应的分享数据;Obtain the socket corresponding to the data transfer instruction and the shared data corresponding to the data transfer instruction;
调用所述套接字通过代理模块和跨核心通信模块集合将所述分享数据发送至第二中央处理器,以使所述第二中央处理器响应于所述数据传输指令,基于所述第二中央处理器中的所述物理网卡将所述分享数据传输至网络设备;Call the socket to send the shared data to the second central processor through the proxy module and the cross-core communication module set, so that the second central processor responds to the data transmission instruction and based on the second The physical network card in the central processor transmits the shared data to the network device;
其中,所述第二中央处理器中的第一操作系统与所述第一中央处理器中的第二操作系统为异构多核作系统。Wherein, the first operating system in the second central processor and the second operating system in the first central processor are heterogeneous multi-core operating systems.
可选的,在所述通过所述第一中央处理器所控制的应用程序获取数据传输指令之前,还包括:Optionally, before obtaining the data transmission instruction through the application program controlled by the first central processor, the method further includes:
获取第二中央处理器发送的代理模块调用信息,所述代理模块调用信息为所述第二中央处理器调用所述第一中央处理器中的代理模块时生成的;Obtain the agent module calling information sent by the second central processor, where the agent module calling information is generated when the second central processor calls the agent module in the first central processor;
在所述第一中央处理器上建立所述套接字,并将所述套接字传输至所述第二中央处理器。Establishing the socket on the first central processor and transmitting the socket to the second central processor.
可选的,所述第一中央处理器还包括守护进程,所述第二中央处理器包括服务进程;Optionally, the first central processor also includes a daemon process, and the second central processor includes a service process;
所述调用所述套接字通过代理模块和跨核心通信模块集合将所述分享数据发送至第二中央处理器,包括:The calling of the socket to send the shared data to the second central processor through the proxy module and the cross-core communication module set includes:
调用所述套接字通过所述代理模块将所述分享数据传输至所述守护进程;Call the socket to transmit the shared data to the daemon process through the proxy module;
控制所述守护进程将所述分享数据通过跨核心通信模块集合将所述分享数据传输至第二中央处理器的所述服务进程。Control the daemon process to transmit the shared data to the service process of the second central processor through a set of cross-core communication modules.
可选的,所述跨核心通信模块集合包括所述第一中央处理器中的第一非对称多核心通信模块和所述第二中央处理器中的第二非对称多核心通信模块;Optionally, the set of cross-core communication modules includes a first asymmetric multi-core communication module in the first central processor and a second asymmetric multi-core communication module in the second central processor;
所述控制所述守护进程将所述分享数据通过跨核心通信模块集合将所述分享数据传输至第二中央处理器的所述服务进程,包括:The control of the daemon process to transmit the shared data to the service process of the second central processor through a set of cross-core communication modules includes:
控制所述守护进程将所述分享数据通过所述第一非对称多核心通信模块传输至第二中央处理器的所述第二非对称多核心通信模块,以使所述第二非对称多核心通信模块所在的服务进程获取到所述分享数据。Control the daemon process to transmit the shared data to the second asymmetric multi-core communication module of the second central processor through the first asymmetric multi-core communication module, so that the second asymmetric multi-core The service process where the communication module is located obtains the shared data.
可选的,所述套接字为UNIX套接字。Optionally, the socket is a UNIX socket.
根据本公开的一方面,提供了一种网络分享方法,应用于第二中央处理器,所述第二中央处理器设置有物理网卡,包括:According to one aspect of the present disclosure, a network sharing method is provided, applied to a second central processor, where the second central processor is provided with a physical network card, including:
通过跨核心通信模块集合获取第一中央处理器发送的分享数据;所述分享数据为所述第一中央处理器获取到针对所述应用程序的数据传输指令,并调用所述数据传输指令对应的套接字通过所述第一中央处理器的代理模块和跨核心通信模块集合发送至所述第二中央处理器的所述数据传输指令对应的分享数据,所述第一中央处理器未设置所述物理网卡;The shared data sent by the first central processor is obtained through a set of cross-core communication modules; the shared data means that the first central processor obtains the data transfer instruction for the application program and calls the corresponding data transfer instruction. The socket sends the shared data corresponding to the data transfer instruction to the second central processor through the agent module and the cross-core communication module set of the first central processor, and the first central processor does not set all The physical network card;
响应于所述数据传输指令,基于所述物理网卡将所述分享数据传输至网络设备。In response to the data transmission instruction, the shared data is transmitted to a network device based on the physical network card.
可选的,所述跨核心通信模块集合包括所述第一中央处理器中的第一非对称多核心通信模块和所述第二中央处理器中的第二非对称多核心通信模块;Optionally, the set of cross-core communication modules includes a first asymmetric multi-core communication module in the first central processor and a second asymmetric multi-core communication module in the second central processor;
所述通过跨核心通信模块集合获取第一中央处理器发送的分享数据,包括:The acquisition of shared data sent by the first central processor through a cross-core communication module set includes:
通过所述第二非对称多核心通信模块获取第一中央处理器经所述第一非对称多核心通信模块发送的分享数据。The shared data sent by the first central processor through the first asymmetric multi-core communication module is obtained through the second asymmetric multi-core communication module.
根据本公开的另一方面,提供了一种网络分享装置,应用于第一中央处理器,所述第一中央处理器未设置物理网卡,包括:According to another aspect of the present disclosure, a network sharing device is provided, applied to a first central processor, and the first central processor is not provided with a physical network card, including:
指令获取单元,用于通过所述第一中央处理器所控制的应用程序获取数据传输指令;An instruction acquisition unit, configured to obtain data transmission instructions through an application program controlled by the first central processor;
数据获取单元,用于获取所述数据传输指令对应的套接字和所述数据传输指令对应的分享数据;A data acquisition unit, used to acquire the socket corresponding to the data transfer instruction and the shared data corresponding to the data transfer instruction;
数据传输单元,用于调用所述套接字通过代理模块和跨核心通信模块集合将所述分享数据发送至第二中央处理器,以使所述第二中央处理器响应于所述数据传输指令,基于所述第二中央处理器中的所述物理网卡将所述分享数据传输至网络设备;A data transmission unit configured to call the socket to send the shared data to the second central processor through the proxy module and the cross-core communication module set, so that the second central processor responds to the data transmission instruction , transmit the shared data to the network device based on the physical network card in the second central processor;
其中,所述第二中央处理器中的第一操作系统与所述第一中央处理器中的第二操作系统为异构多核作系统。Wherein, the first operating system in the second central processor and the second operating system in the first central processor are heterogeneous multi-core operating systems.
可选的,所述装置还包括信息获取单元和套接字建立单元,用于在所述通过所述第一中央处理器所控制的应用程序获取数据传输指令之前:Optionally, the device further includes an information acquisition unit and a socket establishment unit, configured to obtain a data transmission instruction before the application program controlled by the first central processor:
所述信息获取单元,用于获取第二中央处理器发送的代理模块调用信息,所述代理模块调用信息为所述第二中央处理器调用所述第一中央处理器中的代理模块时生成的;The information acquisition unit is used to obtain the agent module call information sent by the second central processor. The agent module call information is generated when the second central processor calls the agent module in the first central processor. ;
所述套接字建立单元,用于在所述第一中央处理器上建立所述套接字,并将所述套接字传输至所述第二中央处理器。The socket establishment unit is configured to establish the socket on the first central processor and transmit the socket to the second central processor.
可选的,所述第一中央处理器还包括守护进程,所述第二中央处理器包括服务进程;Optionally, the first central processor also includes a daemon process, and the second central processor includes a service process;
所述数据传输单元包括套接字调用子单元和进程控制子单元,所述数据传输单元用于调用所述套接字通过代理模块和跨核心通信模块集合将所述分享数据发送至第二中央处理器时:The data transmission unit includes a socket calling subunit and a process control subunit. The data transmission unit is used to call the socket to send the shared data to the second center through a proxy module and a cross-core communication module set. Processor time:
所述套接字调用子单元,用于调用所述套接字通过所述代理模块将所述分享数据传输至所述守护进程;The socket calling subunit is used to call the socket to transmit the shared data to the daemon process through the proxy module;
所述进程控制子单元,用于控制所述守护进程将所述分享数据通过跨核心通信模块集合将所述分享数据传输至第二中央处理器的所述服务进程。The process control subunit is configured to control the daemon process to transmit the shared data to the service process of the second central processor through a set of cross-core communication modules.
可选的,所述跨核心通信模块集合包括所述第一中央处理器中的第一非对称多核心通信模块和所述第二中央处理器中的第二非对称多核心通信模块;Optionally, the set of cross-core communication modules includes a first asymmetric multi-core communication module in the first central processor and a second asymmetric multi-core communication module in the second central processor;
所述进程控制子单元,用于控制所述守护进程将所述分享数据通过跨核心通信模块集合将所述分享数据传输至第二中央处理器的所述服务进程时,具体用于:The process control subunit is used to control the daemon process to transmit the shared data to the service process of the second central processor through a cross-core communication module set, specifically for:
控制所述守护进程将所述分享数据通过所述第一非对称多核心通信模块传输至第二中央处理器的所述第二非对称多核心通信模块,以使所述第二非对称多核心通信模块所在的服务进程获取到所述分享数据。Control the daemon process to transmit the shared data to the second asymmetric multi-core communication module of the second central processor through the first asymmetric multi-core communication module, so that the second asymmetric multi-core The service process where the communication module is located obtains the shared data.
可选的,所述套接字为UNIX套接字。Optionally, the socket is a UNIX socket.
根据本公开的另一方面,提供了一种网络分享装置,应用于第二中央处理器,所述第二中央处理器设置有物理网卡,包括:According to another aspect of the present disclosure, a network sharing device is provided, applied to a second central processor, and the second central processor is provided with a physical network card, including:
数据发送单元,用于通过跨核心通信模块集合获取第一中央处理器发送的分享数据;所述分享数据为所述第一中央处理器获取到针对所述应用程序的数据传输指令,并调用所述数据传输指令对应的套接字通过所述第一中央处理器的代理模块和跨核心通信模块集合发送至所述第二中央处理器的所述数据传输指令对应的分享数据,所述第一中央处理器未设置所述物理网卡;A data sending unit is configured to obtain the shared data sent by the first central processor through a cross-core communication module set; the shared data is for the first central processor to obtain the data transmission instructions for the application program and call the The socket corresponding to the data transfer instruction is sent to the shared data corresponding to the data transfer instruction of the second central processor through the proxy module and the cross-core communication module set of the first central processor. The CPU does not set the physical network card;
指令响应单元,用于响应于所述数据传输指令,基于所述物理网卡将所述分享数据传输至网络设备。An instruction response unit, configured to respond to the data transmission instruction and transmit the shared data to a network device based on the physical network card.
可选的,所述跨核心通信模块集合包括所述第一中央处理器中的第一非对称多核心通信模块和所述第二中央处理器中的第二非对称多核心通信模块;Optionally, the set of cross-core communication modules includes a first asymmetric multi-core communication module in the first central processor and a second asymmetric multi-core communication module in the second central processor;
所述数据发送单元包括数据获取子单元,所述数据发送单元用于通过跨核心通信模块集合获取第一中央处理器发送的分享数据时:The data sending unit includes a data acquisition subunit, and the data sending unit is used to acquire the shared data sent by the first central processor through a cross-core communication module set:
所述数据获取子单元,用于通过所述第二非对称多核心通信模块获取第一中央处理器经所述第一非对称多核心通信模块发送的分享数据。The data acquisition subunit is configured to acquire the shared data sent by the first central processor through the first asymmetric multi-core communication module through the second asymmetric multi-core communication module.
根据本公开的另一方面,提供了一种网络分享系统,所述网络分享系统包括前述一方面中任一项所述的第一中央处理器和前述一方面中任一项所述的第二中央处理器,所述第一中央处理器未设置物理网卡,所述第二中央处理器设置有物理网卡。According to another aspect of the present disclosure, a network sharing system is provided. The network sharing system includes the first central processor according to any one of the foregoing aspects and the second central processor according to any one of the foregoing aspects. Central processor, the first central processor is not provided with a physical network card, and the second central processor is provided with a physical network card.
根据本公开的另一方面,提供了一种电子设备,包括:According to another aspect of the present disclosure, an electronic device is provided, including:
至少一个处理器;以及at least one processor; and
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行前述一方面中任一项所述的方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of the preceding aspects. .
根据本公开的另一方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行前述一方面中任一项所述的方法。According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method according to any one of the preceding aspects.
根据本公开的另一方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现前述一方面中任一项所述的方法。According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program that, when executed by a processor, implements the method of any one of the preceding aspects.
在本公开一个或多个实施例中,通过所述第一中央处理器所控制的应用程序获取数据传输指令;获取所述数据传输指令对应的套接字和所述数据传输指令对应的分享数据;调用所述套接字通过代理模块和跨核心通信模块集合将所述分享数据发送至第二中央处理器,以使所述第二中央处理器响应于所述数据传输指令,基于所述第二中央处理器中的所述物理网卡将所述分享数据传输至网络设备;其中,所述第二中央处理器中的第一操作系统与所述第一中央处理器中的第二操作系统为异构多核作系统。因此,当需要通过不具备物理网卡的第一中央处理器进行数据传输时,可以通过采用套接字和跨核心通信模块集合,将需要传输的数据发送至具备物理网卡的第二中央处理器,进而可以通过第二中央处理器将该数据传输至网络设备。因此,即使电子设备中某一中央处理器不具备网卡能力,也可以通过该中央处理器所控制的应用程序访问网络资源,进而可以提高网络分享的便利性。In one or more embodiments of the present disclosure, a data transmission instruction is obtained through an application program controlled by the first central processor; a socket corresponding to the data transmission instruction and shared data corresponding to the data transmission instruction are obtained. ; Call the socket to send the shared data to the second central processor through the proxy module and the cross-core communication module set, so that the second central processor responds to the data transmission instruction based on the first The physical network card in the two central processors transmits the shared data to the network device; wherein the first operating system in the second central processor and the second operating system in the first central processor are Heterogeneous multi-core operating system. Therefore, when data needs to be transmitted through the first central processor without a physical network card, the data to be transmitted can be sent to the second central processor with a physical network card by using sockets and a cross-core communication module set. The data can then be transmitted to the network device through the second central processor. Therefore, even if a certain central processor in an electronic device does not have network card capabilities, network resources can still be accessed through applications controlled by the central processor, thereby improving the convenience of network sharing.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or important features of the embodiments of the disclosure, nor is it intended to limit the scope of the disclosure. Other features of the present disclosure will become readily understood from the following description.
附图说明Description of the drawings
附图用于更好地理解本方案,不构成对本公开的限定。其中:The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. in:
图1示出本公开实施例提供的一种网络分享方法的背景示意图;Figure 1 shows a background schematic diagram of a network sharing method provided by an embodiment of the present disclosure;
图2示出本公开实施例提供的一种网络分享方法的系统架构图;Figure 2 shows a system architecture diagram of a network sharing method provided by an embodiment of the present disclosure;
图3示出本公开实施例提供的一种网络分享方法的流程示意图;Figure 3 shows a schematic flowchart of a network sharing method provided by an embodiment of the present disclosure;
图4示出本公开实施例提供的一种网络分享方法的流程示意图;Figure 4 shows a schematic flowchart of a network sharing method provided by an embodiment of the present disclosure;
图5示出本公开实施例提供的一种数据传输的流程示意图;Figure 5 shows a schematic flow chart of data transmission provided by an embodiment of the present disclosure;
图6示出本公开实施例提供的一种网络分享方法的流程示意图;Figure 6 shows a schematic flowchart of a network sharing method provided by an embodiment of the present disclosure;
图7示出本公开实施例提供的一种网络分享装置的结构示意图;Figure 7 shows a schematic structural diagram of a network sharing device provided by an embodiment of the present disclosure;
图8示出本公开实施例提供的一种网络分享装置的结构示意图;Figure 8 shows a schematic structural diagram of a network sharing device provided by an embodiment of the present disclosure;
图9示出本公开实施例提供的一种网络分享装置的结构示意图;Figure 9 shows a schematic structural diagram of a network sharing device provided by an embodiment of the present disclosure;
图10示出本公开实施例提供的一种网络分享装置的结构示意图;Figure 10 shows a schematic structural diagram of a network sharing device provided by an embodiment of the present disclosure;
图11示出本公开实施例提供的一种网络分享装置的结构示意图;Figure 11 shows a schematic structural diagram of a network sharing device provided by an embodiment of the present disclosure;
图12是用来实现本公开实施例的网络分享方法的电子设备的框图。FIG. 12 is a block diagram of an electronic device used to implement the network sharing method according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the present disclosure are included to facilitate understanding and should be considered to be exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the disclosure. Also, descriptions of well-known functions and constructions are omitted from the following description for clarity and conciseness.
随着科学技术的发展,电子设备技术的日益成熟,提高了用户生产生活的便利性。电子设备应用场景中,用户例如可以通过电子设备中操作系统上运行的应用程序访问各种各样的网络资源。With the development of science and technology, electronic equipment technology has become increasingly mature, which has improved the convenience of users' production and life. In the electronic device application scenario, users can access various network resources through applications running on the operating system in the electronic device.
根据一些实施例,图1示出本公开实施例提供的一种网络分享方法的背景示意图。如图1所示,用户通过电子设备中操作系统上运行的应用程序访问网络资源时,电子设备中的中央处理器可以利用TCP/IP 4层网络结构,从而具备网卡功能,进而,该中央处理器可以具备联网能力,用户可以通过该中央处理器所控制的应用程序访问网络资源。According to some embodiments, FIG. 1 shows a background schematic diagram of a network sharing method provided by an embodiment of the present disclosure. As shown in Figure 1, when users access network resources through applications running on the operating system in electronic devices, the central processing unit in the electronic device can use the TCP/IP 4-layer network structure to have the network card function. In turn, the central processing unit The server can have networking capabilities, and users can access network resources through applications controlled by the central processor.
在一些实施例中,图2示出本公开实施例提供的一种网络分享方法的系统架构图。如图2所示,当电子设备11在应用程序中接收到针对网络资源的获取指令时,电子设备11可以通过网络12将该获取指令发送至服务器13,进而,服务器13可以获取该获取指令对应的网络资源,并将该网络资源通过网络12发送至电子设备11。In some embodiments, FIG. 2 shows a system architecture diagram of a network sharing method provided by an embodiment of the present disclosure. As shown in Figure 2, when the electronic device 11 receives an acquisition instruction for network resources in the application program, the electronic device 11 can send the acquisition instruction to the server 13 through the network 12, and then the server 13 can obtain the acquisition instruction corresponding to network resources, and send the network resources to the electronic device 11 through the network 12.
易于理解的是,当中央处理器中具备的TCP/IP 4层网络结构不完整时,该中央处理器不具备网卡功能。这种情况下,用户无法通过该中央处理器控制的应用程序访问网络资源。It is easy to understand that when the TCP/IP 4-layer network structure in the central processing unit is incomplete, the central processing unit does not have the network card function. In this case, users cannot access network resources through applications controlled by the CPU.
下面结合具体的实施例对本公开进行详细说明。The present disclosure will be described in detail below with reference to specific embodiments.
在本公开的实施例中,如图3所示,图3示出本公开实施例提供的一种网络分享方法的流程示意图,该方法例如可以应用于第一中央处理器,并且第一中央处理器未设置物理网卡的场景中,该方法可依赖于计算机程序实现,可运行于进行网络分享方法的装置上。该计算机程序可集成在应用中,也可作为独立的工具类应用运行。In an embodiment of the present disclosure, as shown in Figure 3, Figure 3 shows a schematic flowchart of a network sharing method provided by an embodiment of the present disclosure. This method can be applied to a first central processor, for example, and the first central processor In a scenario where the server is not equipped with a physical network card, this method can be implemented by relying on a computer program and can be run on the device that performs the network sharing method. The computer program can be integrated into an application or run as a stand-alone utility application.
其中,网络分享装置可以是具有液体检测功能的电子设备,该电子设备包括但不限于:可穿戴设备、手持设备、个人电脑、平板电脑、车载设备、智能手机、计算设备或连接到无线调制解调器的其它处理设备等。在不同的网络中电子设备可以叫做不同的名称,例如:用户设备、接入电子设备、用户单元、用户站、移动站、移动台、远方站、远程电子设备、移动设备、用户电子设备、电子设备、无线通信设备、用户代理或用户装置、蜂窝电话、无绳电话、个人数字处理(personal digital assistant,PDA)、第五代移动通信技术(5thGeneration Mobile Communication Technology,5G)网络、第四代移动通信技术(the 4thgeneration mobile communication technology,4G)网络、第三代移动通信技术(3rd-Generation,3G)网络或未来演进网络中的电子设备等。The network sharing device may be an electronic device with a liquid detection function, including but not limited to: wearable devices, handheld devices, personal computers, tablets, vehicle-mounted devices, smart phones, computing devices or devices connected to wireless modems. Other processing equipment, etc. Electronic equipment can be called by different names in different networks, for example: user equipment, access electronic equipment, subscriber unit, user station, mobile station, mobile station, remote station, remote electronic equipment, mobile equipment, user electronic equipment, electronic Equipment, wireless communication equipment, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), fifth generation mobile communication technology (5th Generation Mobile Communication Technology, 5G) network, fourth generation mobile communication technology (the 4th generation mobile communication technology, 4G) network, the third generation mobile communication technology (3rd-Generation, 3G) network or electronic equipment in future evolution networks, etc.
具体的,该网络分享方法包括:Specifically, the network sharing method includes:
S101,通过第一中央处理器所控制的应用程序获取数据传输指令;S101, obtain data transmission instructions through the application program controlled by the first central processor;
根据一些实施例,中央处理器(central processing unit,CPU)指的是信息处理、程序运行的最终执行单元。该中央处理器可以作为计算机系统的运算和控制核心。该中央处理器是一块超大规模的集成电路,可以由逻辑部件、寄存器部件和控制部件等部件构成。According to some embodiments, a central processing unit (CPU) refers to the final execution unit for information processing and program execution. The central processing unit can serve as the computing and control core of the computer system. The central processing unit is a very large-scale integrated circuit that can be composed of logic components, register components, control components and other components.
在一些实施例种,第一中央处理器指的是没有网络能力的中央处理器。该第一中央处理器并不特指某一固定处理器。例如,当第一中央处理器包含的部件发生变化时,该第一中央处理器可以发生变化。当第一中央处理器对应的电路发生变化时,该第一中央处理器也可以发生变化。In some embodiments, the first CPU refers to a CPU without network capabilities. The first central processing unit does not specifically refer to a fixed processor. For example, when components included in the first central processor change, the first central processor may change. When the circuit corresponding to the first central processing unit changes, the first central processing unit may also change.
在一些实施例中,应用程序指的是为完成某项或多项特定工作的计算机程序。该应用程序并不特指某一固定应用程序。该应用程序包括但不限于音乐应用程序、时间应用程序等等。In some embodiments, an application program refers to a computer program that performs one or more specific tasks. This application is not specific to a fixed application. The applications include, but are not limited to, music applications, time applications, and more.
在一些实施例中,数据传输指令指的是电子设备进行网络分享时,通过第一中央处理器所控制的应用程序获取到的指令。该数据传输指令并不特指某一固定指令。该数据传输指令包括但不限于语音数据传输指令、点击数据传输指令等等。当电子设备获取到针对数据传输指令的指令修改指令时,该数据传输指令可以发生变化。In some embodiments, the data transmission instruction refers to an instruction obtained through an application program controlled by the first central processor when the electronic device performs network sharing. This data transfer instruction does not refer to a fixed instruction. The data transmission instructions include but are not limited to voice data transmission instructions, click data transmission instructions, etc. When the electronic device obtains the instruction modification instruction for the data transmission instruction, the data transmission instruction may change.
易于理解的是,当电子设备进行网络分享时,电子设备可以通过第一中央处理器所控制的应用程序获取数据传输指令。It is easy to understand that when the electronic device performs network sharing, the electronic device can obtain data transmission instructions through the application program controlled by the first central processor.
S102,获取数据传输指令对应的套接字和数据传输指令对应的分享数据;S102, obtain the socket corresponding to the data transmission instruction and the shared data corresponding to the data transmission instruction;
根据一些实施例,套接字是对网络中不同主机上的应用进程之间进行双向通信的端点的抽象。一个套接字就是网络上进程通信的一端,提供了应用层进程利用网络协议交换数据的机制。该套接字并不特指某一固定套接字。例如,当套接字上联应用进程,下联网络协议栈时,该套接字可以是应用程序通过网络协议进行通信的接口。该套接字也可以是应用程序与网络协议栈进行交互的接口。According to some embodiments, a socket is an abstraction of an endpoint for bidirectional communication between application processes on different hosts in a network. A socket is one end of process communication on the network, providing a mechanism for application layer processes to exchange data using network protocols. This socket is not specific to a fixed socket. For example, when a socket is connected to an application process and connected to a network protocol stack, the socket can be an interface for the application to communicate through the network protocol. The socket can also be the interface through which the application interacts with the network protocol stack.
根据一些实施例,分享数据指的是电子设备进行网络分享时,所需要分享的数据。该分享数据并不特指某一固定数据。例如,当应用程序发生变化时,该分享数据可以发生变化。当数据传输指令发生变化时,该分享数据也可以发生变化。According to some embodiments, sharing data refers to data that needs to be shared when the electronic device performs network sharing. This shared data does not specifically refer to a certain fixed data. For example, this shared data can change when the application changes. When the data transfer instructions change, the shared data can also change.
易于理解的是,当电子设备获取到数据传输指令时,电子设备可以获取数据传输指令对应的套接字和数据传输指令对应的分享数据。It is easy to understand that when the electronic device obtains the data transmission instruction, the electronic device can obtain the socket corresponding to the data transmission instruction and the shared data corresponding to the data transmission instruction.
S103,调用套接字通过代理模块和跨核心通信模块集合将分享数据发送至第二中央处理器,以使第二中央处理器响应于数据传输指令,基于第二中央处理器中的物理网卡将分享数据传输至网络设备。S103. Call the socket to send the shared data to the second central processor through the proxy module and the cross-core communication module set, so that the second central processor responds to the data transmission instruction and sends the shared data based on the physical network card in the second central processor. Share data to network devices.
根据一些实施例,代理模块指的是控制一个电子设备与另一个电子设备通过该代理模块进行非直接连接的模块。该代理模块并不特指某一固定代理模块。例如,当套接字发生变化时,该代理模块可以发生变化。当第一中央处理器发生变化时,该代理模块也可以发生变化。According to some embodiments, the proxy module refers to a module that controls an indirect connection between an electronic device and another electronic device through the proxy module. The agent module does not specifically refer to a fixed agent module. For example, the proxy module can change when the socket changes. When the first central processor changes, the agent module can also change.
根据一些实施例,跨核心通信模块RPMSG(OpenAMP)指的是用于支持不同中央处理器之间进行核心间通信的模块。该跨核心通信模块并不特指某一固定模块。例如,当第一中央处理器发生变化时,该第一中央处理器对应的跨核心通信模块可以发生变化。当第二中央处理器发生变化时,该第二中央处理器对应的跨核心通信模块可以发生变化。According to some embodiments, the cross-core communication module RPMSG (OpenAMP) refers to a module for supporting inter-core communication between different central processors. The cross-core communication module does not refer to a fixed module. For example, when the first central processor changes, the cross-core communication module corresponding to the first central processor may change. When the second central processor changes, the cross-core communication module corresponding to the second central processor may change.
在一些实施例中,跨核心通信模块集合指的是由至少一个跨核心通信模块汇聚而成的集合。该跨核心通信模块集合并不特指某一固定模块。例如,当跨核心通信模块发生变化时,该跨核心通信模块集合可以发生变化。当数据传输指令发生变化时,该跨核心通信模块集合也可以发生变化。In some embodiments, the cross-core communication module set refers to a set formed by at least one cross-core communication module. This set of cross-core communication modules is not specific to a fixed module. For example, when a cross-core communication module changes, the set of cross-core communication modules may change. When data transfer instructions change, this set of cross-core communication modules can also change.
根据一些实施例,第二中央处理器指的是具备网络能力的中央处理器。该第二中央处理器并不特指某一固定处理器。例如,当第二中央处理器包含的部件发生变化时,该第二中央处理器可以发生变化。当第二中央处理器对应的电路发生变化时,该第二中央处理器也可以发生变化。According to some embodiments, the second central processor refers to a central processor with network capabilities. The second central processing unit does not specifically refer to a fixed processor. For example, when the components included in the second central processor change, the second central processor may change. When the circuit corresponding to the second central processing unit changes, the second central processing unit may also change.
根据一些实施例,第二中央处理器中的第一操作系统与第一中央处理器中的第二操作系统为异构多核作系统。异构多核作系统指的是由不同类型的多个单核心或多核心处理器构成的系统。异构多核作系统可以是完全物理隔离的两个操作系统。According to some embodiments, the first operating system in the second CPU and the second operating system in the first CPU are heterogeneous multi-core operating systems. Heterogeneous multi-core operating systems refer to systems composed of multiple single-core or multi-core processors of different types. A heterogeneous multi-core operating system can be two operating systems that are completely physically isolated.
在一些实施例中,操作系统指的是用于管理计算机硬件与软件资源的计算机程序。该操作系统包括但不限于安卓操作系统、IOS操作系统等等。In some embodiments, an operating system refers to a computer program used to manage computer hardware and software resources. The operating system includes but is not limited to Android operating system, IOS operating system, etc.
在一些实施例中,第一操作系统指的是第一中央处理器中设置的操作系统。该第一操作系统并不特指某一固定操作系统。例如,当第一中央处理器发生变化时,该第一操作系统可以发生变化。当电子设备获取到针对第一操作系统的系统修改指令时,该第一操作系统也可以发生变化。In some embodiments, the first operating system refers to the operating system provided in the first central processor. The first operating system does not specifically refer to a fixed operating system. For example, when the first central processor changes, the first operating system may change. When the electronic device obtains the system modification instruction for the first operating system, the first operating system may also change.
在一些实施例中,第二操作系统指的是第二中央处理器中设置的操作系统。该第二操作系统并不特指某一固定操作系统。例如,当第二中央处理器发生变化时,该第二操作系统可以发生变化。当电子设备获取到针对第二操作系统的系统修改指令时,该第二操作系统也可以发生变化。In some embodiments, the second operating system refers to the operating system provided in the second central processor. The second operating system does not specifically refer to a fixed operating system. For example, when the second CPU changes, the second operating system may change. When the electronic device obtains the system modification instruction for the second operating system, the second operating system may also change.
在一些实施例中,物理网卡是连接中央处理器内核空间的网络协议栈和外界网络,以01形式的比特流收发数据的硬件设备。物理网卡的一端是内核空间的网络协议栈,另一端是外界网络。该物理网卡并不特指某一固定网卡。例如,当中央处理器发生变化时,该物理网卡可以发生变化。In some embodiments, the physical network card is a hardware device that connects the network protocol stack in the core space of the central processor and the external network, and sends and receives data in a bit stream in the form of 01. One end of the physical network card is the network protocol stack in the kernel space, and the other end is the external network. The physical network card does not specifically refer to a fixed network card. For example, when the CPU changes, the physical network card can change.
根据一些实施例,网络设备指的是连接到网络中的物理实体设备。该网络设备并不特指某一固定设备。该网络设备包括但不限于计算机、集线器、交换机、网桥、路由器、网关、网络接口卡、无线接入点、打印机和调制解调器、光纤收发器、光缆等等。According to some embodiments, a network device refers to a physical entity connected to a network. The network equipment does not refer to a specific fixed equipment. This network equipment includes, but is not limited to, computers, hubs, switches, bridges, routers, gateways, network interface cards, wireless access points, printers and modems, fiber optic transceivers, fiber optic cables, and more.
易于理解的是,当电子设备获取到数据传输指令对应的套接字和数据传输指令对应的分享数据时,电子设备可以调用套接字通过代理模块和跨核心通信模块集合将分享数据发送至第二中央处理器,进而,电子设备可以控制第二中央处理器响应于数据传输指令,并基于第二中央处理器中的物理网卡将分享数据传输至网络设备。It is easy to understand that when the electronic device obtains the socket corresponding to the data transfer instruction and the shared data corresponding to the data transfer instruction, the electronic device can call the socket to send the shared data to the third party through the proxy module and the cross-core communication module set. The second central processor, and further, the electronic device can control the second central processor to respond to the data transmission instruction and transmit the shared data to the network device based on the physical network card in the second central processor.
在本公开实施例中,通过第一中央处理器所控制的应用程序获取数据传输指令;获取数据传输指令对应的套接字和数据传输指令对应的分享数据;调用套接字通过代理模块和跨核心通信模块集合将分享数据发送至第二中央处理器,以使第二中央处理器响应于数据传输指令,基于第二中央处理器中的物理网卡将分享数据传输至网络设备。因此,当需要通过不具备物理网卡的第一中央处理器进行数据传输时,可以通过采用套接字和跨核心通信模块集合,将需要传输的数据发送至具备物理网卡的第二中央处理器,进而可以通过第二中央处理器将该数据传输至网络设备。因此,即使电子设备中某一中央处理器不具备网卡能力,也可以通过该中央处理器所控制的应用程序访问网络资源,进而可以提高网络分享的便利性。In the embodiment of the present disclosure, the data transmission instruction is obtained through the application program controlled by the first central processor; the socket corresponding to the data transmission instruction and the shared data corresponding to the data transmission instruction are obtained; the socket is called through the proxy module and the cross-connection The core communication module set sends the shared data to the second central processor, so that the second central processor responds to the data transmission instruction and transmits the shared data to the network device based on the physical network card in the second central processor. Therefore, when data needs to be transmitted through the first central processor without a physical network card, the data to be transmitted can be sent to the second central processor with a physical network card by using sockets and a cross-core communication module set. The data can then be transmitted to the network device through the second central processor. Therefore, even if a certain central processor in an electronic device does not have network card capabilities, network resources can still be accessed through applications controlled by the central processor, thereby improving the convenience of network sharing.
请参见图4,图4示出本公开实施例提供的一种网络分享方法的流程示意图。该方法例如可以应用于第一中央处理器,并且第一中央处理器未设置物理网卡的场景中。具体的,该网络分享方法包括:Please refer to FIG. 4 , which is a schematic flowchart of a network sharing method provided by an embodiment of the present disclosure. This method can be applied, for example, to a scenario where the first central processor is not equipped with a physical network card. Specifically, the network sharing method includes:
S201,获取第二中央处理器发送的代理模块调用信息;S201, obtain the agent module calling information sent by the second central processor;
具体过程如上,此处不再赘述。The specific process is as above and will not be described again here.
根据一些实施例,代理模块调用信息指的是第二中央处理器调用第一中央处理器中的代理模块时生成的信息。该代理模块调用信息并不特指某一固定信息。例如,当代理模块发生变化时,该代理模块调用信息可以发生变化。当第二中央处理器发生变化时,该代理模块调用信息也可以发生变化。According to some embodiments, the agent module calling information refers to information generated when the second central processor calls the agent module in the first central processor. The agent module calling information does not specifically refer to certain fixed information. For example, when the agent module changes, the agent module calling information can change. When the second central processor changes, the agent module calling information may also change.
例如,当第二中央处理器调用第一中央处理器中的代理模块usrsock对应的套接字socket()时,第二中央处理器可以将对socket()的调用信息传递至第一中央处理器。For example, when the second central processor calls the socket() corresponding to the proxy module usrsock in the first central processor, the second central processor can transfer the call information to socket() to the first central processor. .
易于理解的是,当电子设备进行网络分享方法时,电子设备可以获取第二中央处理器发送的代理模块调用信息。It is easy to understand that when the electronic device performs the network sharing method, the electronic device can obtain the proxy module calling information sent by the second central processor.
S202,在第一中央处理器上建立套接字,并将套接字传输至第二中央处理器;S202, establish a socket on the first central processor and transmit the socket to the second central processor;
具体过程如上,此处不再赘述。The specific process is as above and will not be described again here.
根据一些实施例,当电子设备在第一中央处理器上建立套接字时,建立的套接字例如可以为UNIX套接字。在这种情况下,第一操作系统可以提供给用户空间一种无感的网络分享,进而可以提高网络分享的便利性。According to some embodiments, when the electronic device establishes a socket on the first central processor, the established socket may be, for example, a UNIX socket. In this case, the first operating system can provide user space with a senseless network sharing, thereby improving the convenience of network sharing.
在一些实施例中,当第二中央处理器将对socket()的调用信息传递至第一中央处理器时,电子设备可以在第一中央处理器上建立socket套接字,进而,电子设备可以将该socket套接字发送至第二中央处理器。In some embodiments, when the second central processor passes the socket() call information to the first central processor, the electronic device can establish a socket on the first central processor, and further, the electronic device can Send the socket to the second CPU.
易于理解的是,当电子设备获取到代理模块调用信息时,电子设备可以在第一中央处理器上建立套接字,并将套接字传输至第二中央处理器。It is easy to understand that when the electronic device obtains the proxy module calling information, the electronic device can establish a socket on the first central processor and transmit the socket to the second central processor.
S203,通过第一中央处理器所控制的应用程序获取数据传输指令;S203, obtain data transmission instructions through the application program controlled by the first central processor;
具体过程如上,此处不再赘述。The specific process is as above and will not be described again here.
根据一些实施例,图5示出本公开实施例提供的一种数据传输的流程示意图。如图5所示,第一中央处理器所控制的应用程序对应的交互界面中,设置有数据传输按键。当电子设备检测到用户点击该数据传输按键时,电子设备可以获取到针对该数据传输按键所输入的数据传输指令。According to some embodiments, FIG. 5 shows a schematic flowchart of data transmission provided by an embodiment of the present disclosure. As shown in Figure 5, the interactive interface corresponding to the application program controlled by the first central processor is provided with a data transmission button. When the electronic device detects that the user clicks the data transmission button, the electronic device can obtain the data transmission instruction input for the data transmission button.
易于理解的是,当电子设备进行网络分享时,电子设备可以通过第一中央处理器所控制的应用程序获取数据传输指令。It is easy to understand that when the electronic device performs network sharing, the electronic device can obtain data transmission instructions through the application program controlled by the first central processor.
S204,获取数据传输指令对应的套接字和数据传输指令对应的分享数据;S204, obtain the socket corresponding to the data transmission instruction and the shared data corresponding to the data transmission instruction;
具体过程如上,此处不再赘述。The specific process is as above and will not be described again here.
根据一些实施例,当电子设备获取到数据传输指令时,电子设备可以获取的数据传输指令对应的套接字包括但不限于socket()、send()、recv()、send()、bind()等等。例如,当电子设备获取到数据传输指令时,电子设备可以获取数据传输指令对应的套接字send()。电子设备还可以获取数据传输指令对应的套接字bind()。According to some embodiments, when the electronic device obtains the data transmission instruction, the socket corresponding to the data transmission instruction that the electronic device can obtain includes but is not limited to socket(), send(), recv(), send(), bind( )etc. For example, when the electronic device obtains the data transmission instruction, the electronic device can obtain the socket send() corresponding to the data transmission instruction. The electronic device can also obtain the socket bind() corresponding to the data transfer instruction.
易于理解的是,当电子设备获取到数据传输指令时,电子设备可以获取数据传输指令对应的套接字和数据传输指令对应的分享数据。It is easy to understand that when the electronic device obtains the data transmission instruction, the electronic device can obtain the socket corresponding to the data transmission instruction and the shared data corresponding to the data transmission instruction.
S205,调用套接字通过代理模块将分享数据传输至守护进程;S205, call the socket to transmit the shared data to the daemon process through the proxy module;
具体过程如上,此处不再赘述。The specific process is as above and will not be described again here.
根据一些实施例,守护进程指的是运行在第一中央处理器的后台,并且不受任何电子设备控制的进程。该守护进程独立于控制电子设备并且周期性地执行某种任务或等待处理某些发生的事件。该守护进程不需要用户输入就能运行而且提供某种服务。该守护进程并不特指某一固定进程。例如,当守护进行执行的任务发生变化时,该守护进程可以发生变化。当第一中央处理器发生变化时,该守护进程也可以发生变化。According to some embodiments, a daemon process refers to a process that runs in the background of the first central processor and is not controlled by any electronic device. This daemon is independent of the control electronics and periodically performs some task or waits for some event to occur. This daemon requires no user input to run and provide some kind of service. This daemon is not specific to a fixed process. For example, the daemon process can change when the tasks it performs change. When the first CPU changes, this daemon can also change.
在一些实施例中,电子设备通过控制第一中央处理器所控制的应用程序调用套接字send(),因此电子设备可以直接通过代理模块usrsock将分享数据传输至守护进程usrsock client。In some embodiments, the electronic device calls the socket send() by controlling the application program controlled by the first central processor, so the electronic device can directly transmit the shared data to the daemon process usrsock client through the proxy module usrsock.
易于理解的是,当电子设备获取到数据传输指令对应的套接字和数据传输指令对应的分享数据时,电子设备可以调用套接字通过代理模块将分享数据传输至守护进程。It is easy to understand that when the electronic device obtains the socket corresponding to the data transfer instruction and the shared data corresponding to the data transfer instruction, the electronic device can call the socket to transfer the shared data to the daemon process through the proxy module.
S206,控制守护进程将分享数据通过跨核心通信模块集合传输至第二中央处理器的服务进程,以使第二中央处理器响应于数据传输指令,基于第二中央处理器中的物理网卡将分享数据传输至网络设备;S206, the control daemon process transmits the shared data to the service process of the second central processor through the cross-core communication module set, so that the second central processor responds to the data transmission instruction and based on the physical network card in the second central processor, the shared data is transferred to the service process of the second central processor. Data transmission to network equipment;
具体过程如上,此处不再赘述。The specific process is as above and will not be described again here.
根据一些实施例,服务进程指的是第二中央处理器中系统自动完成的,不需要和用户交互的程序。该服务进程并不特指某一固定进程。例如,当服务进程执行的任务发生变化时,该服务进程可以发生变化。当第二中央处理器发生变化时,该服务进程也可以发生变化。According to some embodiments, the service process refers to a program in the second central processor that is automatically completed by the system and does not require interaction with the user. The service process does not specifically refer to a fixed process. For example, a service process can change when the tasks it performs change. When the second central processor changes, the service process can also change.
例如,当电子设备通过代理模块usrsock将分享数据传输至守护进程usrsockclient时,电子设备可以控制守护进程usrsock client将分享数据通过跨核心通信模块集合将分享数据传输至第二中央处理器的服务进程usrsock server。For example, when the electronic device transmits the shared data to the daemon process usrsockclient through the proxy module usrsock, the electronic device can control the daemon process usrsock client to transmit the shared data to the service process usrsock of the second central processor through a set of cross-core communication modules. server.
根据一些实施例,当电子设备控制守护进程将分享数据通过跨核心通信模块集合将分享数据传输至第二中央处理器的服务进程时,电子设备可以控制守护进程将分享数据通过第一非对称多核心通信模块将分享数据传输至第二中央处理器的第二非对称多核心通信模块,以使第二非对称多核心通信模块所在的服务进程获取到分享数据。因此可以提高电子设备传输分享数据的准确性。According to some embodiments, when the electronic device control daemon transmits the shared data to the service process of the second central processor through the cross-core communication module set, the electronic device can control the daemon to transmit the shared data through the first asymmetric multi-core communication module. The core communication module transmits the shared data to the second asymmetric multi-core communication module of the second central processor, so that the service process where the second asymmetric multi-core communication module is located obtains the shared data. Therefore, the accuracy of the electronic device's transmission of shared data can be improved.
在一些实施例中,非对称多核心通信模块指的是用少量通用处理核心来处理需要较高软件灵活性的任务的模块。同时,该非对称多核心通信模块也可以采用大量的硬件加速器来处理更多的任务。In some embodiments, an asymmetric multi-core communication module refers to a module that uses a small number of general-purpose processing cores to handle tasks that require higher software flexibility. At the same time, the asymmetric multi-core communication module can also use a large number of hardware accelerators to handle more tasks.
在一些实施例中,第一非对称多核心通信模块指的是跨核心通信模块集合中第一中央处理器对应的非对称多核心通信模块。该第一非对称多核心通信模块并不特指某一固定模块。例如,当第一中央处理器发生变化时,该第一非对称多核心通信模块可以发生变化。当跨核心通信模块集合发生变化时,该第一非对称多核心通信模块也可以发生变化。In some embodiments, the first asymmetric multi-core communication module refers to the asymmetric multi-core communication module corresponding to the first central processor in the cross-core communication module set. The first asymmetric multi-core communication module does not specifically refer to a fixed module. For example, when the first central processor changes, the first asymmetric multi-core communication module may change. When the set of cross-core communication modules changes, the first asymmetric multi-core communication module may also change.
在一些实施例中,第二非对称多核心通信模块指的是跨核心通信模块集合中第二中央处理器对应的非对称多核心通信模块。该第二非对称多核心通信模块并不特指某一固定模块。例如,当第二中央处理器发生变化时,该第二非对称多核心通信模块可以发生变化。当跨核心通信模块集合发生变化时,该第二非对称多核心通信模块也可以发生变化。In some embodiments, the second asymmetric multi-core communication module refers to the asymmetric multi-core communication module corresponding to the second central processor in the cross-core communication module set. The second asymmetric multi-core communication module does not specifically refer to a fixed module. For example, when the second central processor changes, the second asymmetric multi-core communication module may change. When the set of cross-core communication modules changes, the second asymmetric multi-core communication module may also change.
例如,当电子设备通过代理模块usrsock将分享数据传输至守护进程usrsockclient时,电子设备可以控制守护进程usrsock client通过第一非对称多核心通信模块OpenAMP1,将分享数据传输至第二非对称多核心通信模块OpenAMP2。For example, when the electronic device transmits the shared data to the daemon process usrsockclient through the proxy module usrsock, the electronic device can control the daemon process usrsock client to transmit the shared data to the second asymmetric multi-core communication through the first asymmetric multi-core communication module OpenAMP1 Module OpenAMP2.
易于理解的是,当电子设备调用套接字通过代理模块将分享数据传输至守护进程时,电子设备可以控制守护进程将分享数据通过跨核心通信模块集合将分享数据传输至第二中央处理器的服务进程,进而,电子设备可以使第二中央处理器响应于数据传输指令,基于第二中央处理器中的物理网卡将分享数据传输至网络设备。It is easy to understand that when the electronic device calls the socket to transmit the shared data to the daemon process through the proxy module, the electronic device can control the daemon process to transmit the shared data to the second central processor through a set of cross-core communication modules. The service process, and further, the electronic device can cause the second central processor to respond to the data transmission instruction and transmit the shared data to the network device based on the physical network card in the second central processor.
在本公开实施例中,通过获取第二中央处理器发送的代理模块调用信息;在第一中央处理器上建立套接字,并将套接字传输至第二中央处理器;因此可以提高数据传输指令对应的套接字的获取效率。通过第一中央处理器所控制的应用程序获取数据传输指令;获取数据传输指令对应的套接字和数据传输指令对应的分享数据;通过调用套接字通过代理模块将分享数据传输至守护进程;控制守护进程将分享数据通过跨核心通信模块集合传输至第二中央处理器的服务进程,以使第二中央处理器响应于数据传输指令,基于第二中央处理器中的物理网卡将分享数据传输至网络设备;因此,当需要通过不具备物理网卡的第一中央处理器进行数据传输时,可以通过采用套接字和跨核心通信模块集合,将需要传输的数据发送至具备物理网卡的第二中央处理器,进而可以通过第二中央处理器将该数据传输至网络设备。因此,即使电子设备中某一中央处理器不具备网卡能力,也可以通过该中央处理器所控制的应用程序访问网络资源,进而可以提高网络分享的便利性。In the embodiment of the present disclosure, by obtaining the proxy module calling information sent by the second central processor; establishing a socket on the first central processor and transmitting the socket to the second central processor; therefore, the data can be improved The acquisition efficiency of the socket corresponding to the transfer command. Obtain the data transfer instruction through the application program controlled by the first central processor; obtain the socket corresponding to the data transfer instruction and the shared data corresponding to the data transfer instruction; transfer the shared data to the daemon process through the proxy module by calling the socket; The control daemon transmits the shared data to the service process of the second central processor through the cross-core communication module set, so that the second central processor responds to the data transfer instruction and transmits the shared data based on the physical network card in the second central processor to the network device; therefore, when data needs to be transmitted through the first central processor without a physical network card, the data to be transmitted can be sent to the second CPU with a physical network card by using sockets and a set of cross-core communication modules. The central processing unit, in turn, can transmit the data to the network device through the second central processing unit. Therefore, even if a certain central processor in an electronic device does not have network card capabilities, network resources can still be accessed through applications controlled by the central processor, thereby improving the convenience of network sharing.
本公开的技术方案中,所涉及的用户个人信息的收集、存储、使用、加工、传输、提供和公开等处理,均符合相关法律法规的规定,且不违背公序良俗。In the technical solution of this disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are in compliance with relevant laws and regulations and do not violate public order and good customs.
请参见图6,图6示出本公开实施例提供的一种网络分享方法的流程示意图。该网络分享方法应用于第二中央处理器,第二中央处理器设置有物理网卡的场景。具体的,该网络分享方法包括:Please refer to FIG. 6 , which is a schematic flowchart of a network sharing method provided by an embodiment of the present disclosure. This network sharing method is applied to the scenario where the second central processor is equipped with a physical network card. Specifically, the network sharing method includes:
S301,通过跨核心通信模块集合获取第一中央处理器发送的分享数据;S301, obtain the shared data sent by the first central processor through a cross-core communication module set;
根据一些实施例,分享数据指的是第一中央处理器获取到针对应用程序的数据传输指令,并调用数据传输指令对应的套接字通过第一中央处理器的代理模块和跨核心通信模块集合发送至第二中央处理器的数据传输指令对应的分享数据。According to some embodiments, sharing data means that the first central processor obtains the data transfer instruction for the application and calls the socket corresponding to the data transfer instruction through the proxy module and cross-core communication module set of the first central processor. Shared data corresponding to the data transfer instruction sent to the second central processor.
在一些实施例中,当电子设备通过跨核心通信模块集合获取第一中央处理器发送的分享数据时,第一中央处理器未设置物理网卡。In some embodiments, when the electronic device obtains the shared data sent by the first central processor through a cross-core communication module set, the first central processor does not set a physical network card.
根据一些实施例,跨核心通信模块集合包括第一中央处理器中的第一非对称多核心通信模块和第二中央处理器中的第二非对称多核心通信模块。当电子设备通过跨核心通信模块集合获取第一中央处理器发送的分享数据时,电子设备可以通过第二非对称多核心通信模块获取第一中央处理器经第一非对称多核心通信模块发送的分享数据。According to some embodiments, the set of cross-core communication modules includes a first asymmetric multi-core communication module in the first central processor and a second asymmetric multi-core communication module in the second central processor. When the electronic device obtains the shared data sent by the first central processor through the cross-core communication module set, the electronic device can obtain the shared data sent by the first central processor through the first asymmetric multi-core communication module through the second asymmetric multi-core communication module. Share data.
易于理解的是,当电子设备进行网络分享时,电子设备可以通过跨核心通信模块集合获取第一中央处理器发送的分享数据。It is easy to understand that when the electronic device performs network sharing, the electronic device can obtain the shared data sent by the first central processor through a set of cross-core communication modules.
S302,响应于数据传输指令,基于物理网卡将分享数据传输至网络设备;S302, in response to the data transmission command, transmit the shared data to the network device based on the physical network card;
根据一些实施例,当电子设备基于物理网卡将分享数据传输至网络设备时,电子设备可以在第二中央处理器的内核协议栈中封装好分享数据对应的数据包,进而,电子设备可以基于物理网卡将该数据包发送至网络设备。According to some embodiments, when the electronic device transmits the shared data to the network device based on the physical network card, the electronic device can encapsulate the data packet corresponding to the shared data in the core protocol stack of the second central processor. Furthermore, the electronic device can transmit the shared data to the network device based on the physical network card. The network card sends the packet to the network device.
易于理解的是,当电子设备获取到第一中央处理器发送的分享数据时,电子设备可以响应于数据传输指令,基于物理网卡将分享数据传输至网络设备。It is easy to understand that when the electronic device obtains the sharing data sent by the first central processor, the electronic device can respond to the data transmission instruction and transmit the sharing data to the network device based on the physical network card.
在本公开实施例中,通过跨核心通信模块集合获取第一中央处理器发送的分享数据;响应于数据传输指令,基于物理网卡将分享数据传输至网络设备;因此,当需要通过不具备物理网卡的第一中央处理器进行数据传输时,可以通过采用套接字和跨核心通信模块集合,将需要传输的数据发送至具备物理网卡的第二中央处理器,进而可以通过第二中央处理器将该数据传输至网络设备。因此,即使电子设备中某一中央处理器不具备网卡能力,也可以通过该中央处理器所控制的应用程序访问网络资源。In the embodiment of the present disclosure, the shared data sent by the first central processor is obtained through a cross-core communication module set; in response to the data transmission instruction, the shared data is transmitted to the network device based on the physical network card; therefore, when it is necessary to pass the physical network card without When the first central processor transmits data, it can use sockets and a cross-core communication module set to send the data to be transmitted to the second central processor with a physical network card, and then the second central processor can transmit the data to the second central processor through the second central processor. This data is transmitted to the network device. Therefore, even if a central processor in an electronic device does not have network card capabilities, network resources can still be accessed through applications controlled by the central processor.
下述为本公开装置实施例,可以用于执行本公开方法实施例。对于本公开装置实施例中未披露的细节,请参照本公开方法实施例。The following are device embodiments of the present disclosure, which can be used to perform method embodiments of the present disclosure. For details not disclosed in the device embodiments of the disclosure, please refer to the method embodiments of the disclosure.
请参见图7,其示出了本公开一个示例性实施例提供的一种网络分享装置的结构示意图。该网络分享装置可以通过软件、硬件或者两者的结合实现成为装置的全部或一部分。该网络分享装置应用于包括第一中央处理器,且第一中央处理器未设置物理网卡的场景,该网络分享装置700包括指令获取单元701、数据获取单元702和数据传输单元703,其中:Please refer to FIG. 7 , which shows a schematic structural diagram of a network sharing device provided by an exemplary embodiment of the present disclosure. The network sharing device can be implemented as all or part of the device through software, hardware, or a combination of both. The network sharing device is applied to a scenario that includes a first central processor, and the first central processor does not have a physical network card. The network sharing device 700 includes an instruction acquisition unit 701, a data acquisition unit 702, and a data transmission unit 703, wherein:
指令获取单元701,用于通过第一中央处理器所控制的应用程序获取数据传输指令;The instruction acquisition unit 701 is used to obtain data transmission instructions through the application program controlled by the first central processor;
数据获取单元702,用于获取数据传输指令对应的套接字和数据传输指令对应的分享数据;The data acquisition unit 702 is used to acquire the socket corresponding to the data transfer instruction and the shared data corresponding to the data transfer instruction;
数据传输单元703,用于调用套接字通过代理模块和跨核心通信模块集合将分享数据发送至第二中央处理器,以使第二中央处理器响应于数据传输指令,基于第二中央处理器中的物理网卡将分享数据传输至网络设备;The data transmission unit 703 is used to call the socket to send the shared data to the second central processor through the proxy module and the cross-core communication module set, so that the second central processor responds to the data transmission instruction, based on the second central processor The physical network card in the network transmits the shared data to the network device;
其中,第二中央处理器中的第一操作系统与第一中央处理器中的第二操作系统为异构多核作系统。Wherein, the first operating system in the second central processor and the second operating system in the first central processor are heterogeneous multi-core operating systems.
根据一些实施例,图8示出本公开实施例提供的一种网络分享装置的结构示意图。如图8所示,网络分享装置700还包括信息获取单元704和套接字建立单元705,用于在通过第一中央处理器所控制的应用程序获取数据传输指令之前:According to some embodiments, FIG. 8 shows a schematic structural diagram of a network sharing device provided by an embodiment of the present disclosure. As shown in Figure 8, the network sharing device 700 also includes an information acquisition unit 704 and a socket establishment unit 705, which are used to obtain data transmission instructions before the application program controlled by the first central processor:
信息获取单元704,用于获取第二中央处理器发送的代理模块调用信息,代理模块调用信息为第二中央处理器调用第一中央处理器中的代理模块时生成的;The information acquisition unit 704 is used to obtain the agent module call information sent by the second central processor. The agent module call information is generated when the second central processor calls the agent module in the first central processor;
套接字建立单元705,用于在第一中央处理器上建立套接字,并将套接字传输至第二中央处理器。The socket establishment unit 705 is used to establish a socket on the first central processor and transmit the socket to the second central processor.
根据一些实施例,图9示出本公开实施例提供的一种网络分享装置的结构示意图。如图9所示,第一中央处理器还包括守护进程,第二中央处理器包括服务进程;According to some embodiments, FIG. 9 shows a schematic structural diagram of a network sharing device provided by an embodiment of the present disclosure. As shown in Figure 9, the first central processor also includes a daemon process, and the second central processor includes a service process;
数据传输单元703包括套接字调用子单元713和进程控制子单元723,数据传输单元703用于调用套接字通过代理模块和跨核心通信模块集合将分享数据发送至第二中央处理器时:The data transmission unit 703 includes a socket calling subunit 713 and a process control subunit 723. The data transmission unit 703 is used to call the socket to send the shared data to the second central processor through the proxy module and the cross-core communication module set:
套接字调用子单元713,用于调用套接字通过代理模块将分享数据传输至守护进程;The socket calling subunit 713 is used to call the socket to transmit the shared data to the daemon process through the proxy module;
进程控制子单元723,用于控制守护进程将分享数据通过跨核心通信模块集合将分享数据传输至第二中央处理器的服务进程。The process control subunit 723 is used to control the daemon process to transmit the shared data to the service process of the second central processor through a set of cross-core communication modules.
根据一些实施例,跨核心通信模块集合包括第一中央处理器中的第一非对称多核心通信模块和第二中央处理器中的第二非对称多核心通信模块;According to some embodiments, the set of cross-core communication modules includes a first asymmetric multi-core communication module in the first central processor and a second asymmetric multi-core communication module in the second central processor;
进程控制子单元,用于控制守护进程将分享数据通过跨核心通信模块集合将分享数据传输至第二中央处理器的服务进程时,具体用于:The process control subunit is used to control the daemon process to transmit the shared data to the service process of the second central processor through the cross-core communication module set. It is specifically used for:
控制守护进程将分享数据通过第一非对称多核心通信模块传输至第二中央处理器的第二非对称多核心通信模块,以使第二非对称多核心通信模块所在的服务进程获取到分享数据。The control daemon transmits the shared data to the second asymmetric multi-core communication module of the second central processor through the first asymmetric multi-core communication module, so that the service process where the second asymmetric multi-core communication module is located obtains the shared data .
根据一些实施例,套接字为UNIX套接字。According to some embodiments, the socket is a UNIX socket.
上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。The above serial numbers of the embodiments of the present disclosure are only for description and do not represent the advantages and disadvantages of the embodiments.
在本公开实施例中,通过指令获取单元通过第一中央处理器所控制的应用程序获取数据传输指令;数据获取单元获取数据传输指令对应的套接字和数据传输指令对应的分享数据;数据传输单元调用套接字通过代理模块和跨核心通信模块集合将分享数据发送至第二中央处理器,以使第二中央处理器响应于数据传输指令,基于第二中央处理器中的物理网卡将分享数据传输至网络设备;其中,第二中央处理器中的第一操作系统与第一中央处理器中的第二操作系统为异构多核作系统。因此,当需要通过不具备物理网卡的第一中央处理器进行数据传输时,可以通过采用套接字和跨核心通信模块集合,将需要传输的数据发送至具备物理网卡的第二中央处理器,进而可以通过第二中央处理器将该数据传输至网络设备。因此,即使电子设备中某一中央处理器不具备网卡能力,也可以通过该中央处理器所控制的应用程序访问网络资源。In the embodiment of the present disclosure, the data transmission instruction is obtained through the application program controlled by the first central processor through the instruction acquisition unit; the data acquisition unit obtains the socket corresponding to the data transmission instruction and the shared data corresponding to the data transmission instruction; data transmission The unit calls the socket to send the shared data to the second central processor through the proxy module and the cross-core communication module set, so that the second central processor responds to the data transfer instruction, based on the physical network card in the second central processor. The data is transmitted to the network device; wherein the first operating system in the second central processor and the second operating system in the first central processor are heterogeneous multi-core operating systems. Therefore, when data needs to be transmitted through the first central processor without a physical network card, the data to be transmitted can be sent to the second central processor with a physical network card by using sockets and a cross-core communication module set. The data can then be transmitted to the network device through the second central processor. Therefore, even if a central processor in an electronic device does not have network card capabilities, network resources can still be accessed through applications controlled by the central processor.
本公开的技术方案中,所涉及的用户个人信息的获取、存储和应用等,均符合相关法律法规的规定,且不违背公序良俗。In the technical solution of this disclosure, the acquisition, storage and application of user personal information are in compliance with relevant laws and regulations and do not violate public order and good customs.
下述为本公开装置实施例,可以用于执行本公开方法实施例。对于本公开装置实施例中未披露的细节,请参照本公开方法实施例。The following are device embodiments of the present disclosure, which can be used to perform method embodiments of the present disclosure. For details not disclosed in the device embodiments of the disclosure, please refer to the method embodiments of the disclosure.
请参见图10,其示出了本公开一个示例性实施例提供的一种网络分享装置的结构示意图。该网络分享装置可以通过软件、硬件或者两者的结合实现成为装置的全部或一部分。该网络分享装置应用于包括第二中央处理器,且第二中央处理器设置有物理网卡的场景,该网络分享装置1000包括数据发送单元1001和指令响应单元1002,其中:Please refer to FIG. 10 , which shows a schematic structural diagram of a network sharing device provided by an exemplary embodiment of the present disclosure. The network sharing device can be implemented as all or part of the device through software, hardware, or a combination of both. The network sharing device is applied to a scenario that includes a second central processor, and the second central processor is provided with a physical network card. The network sharing device 1000 includes a data sending unit 1001 and an instruction response unit 1002, wherein:
数据发送单元1001,用于通过跨核心通信模块集合获取第一中央处理器发送的分享数据;分享数据为第一中央处理器获取到针对应用程序的数据传输指令,并调用数据传输指令对应的套接字通过第一中央处理器的代理模块和跨核心通信模块集合发送至第二中央处理器的数据传输指令对应的分享数据,第一中央处理器未设置物理网卡;The data sending unit 1001 is used to obtain the shared data sent by the first central processor through a cross-core communication module set; the shared data is for the first central processor to obtain the data transmission instructions for the application and call the package corresponding to the data transmission instructions. The interface sends the shared data corresponding to the data transfer instruction to the second central processor through the agent module and the cross-core communication module set of the first central processor, and the first central processor does not have a physical network card;
指令响应单元1002,用于响应于数据传输指令,基于物理网卡将分享数据传输至网络设备。The instruction response unit 1002 is configured to respond to the data transmission instruction and transmit the shared data to the network device based on the physical network card.
根据一些实施例,图11示出本公开实施例提供的一种网络分享装置的结构示意图。如图11所示,跨核心通信模块集合包括第一中央处理器中的第一非对称多核心通信模块和第二中央处理器中的第二非对称多核心通信模块;According to some embodiments, FIG. 11 shows a schematic structural diagram of a network sharing device provided by an embodiment of the present disclosure. As shown in Figure 11, the cross-core communication module set includes a first asymmetric multi-core communication module in the first central processor and a second asymmetric multi-core communication module in the second central processor;
数据发送单元1001包括数据获取子单元1011,数据发送单元1001用于通过跨核心通信模块集合获取第一中央处理器发送的分享数据时:The data sending unit 1001 includes a data acquisition subunit 1011. The data sending unit 1001 is used to acquire the shared data sent by the first central processor through a cross-core communication module set:
数据获取子单元1011,用于通过第二非对称多核心通信模块获取第一中央处理器经第一非对称多核心通信模块发送的分享数据。The data acquisition subunit 1011 is configured to acquire the shared data sent by the first central processor through the first asymmetric multi-core communication module through the second asymmetric multi-core communication module.
上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。The above serial numbers of the embodiments of the present disclosure are only for description and do not represent the advantages and disadvantages of the embodiments.
在本公开实施例中,通过数据发送单元通过跨核心通信模块集合获取第一中央处理器发送的分享数据;指令响应单元响应于数据传输指令,基于物理网卡将分享数据传输至网络设备。因此,当需要通过不具备物理网卡的第一中央处理器进行数据传输时,可以通过采用套接字和跨核心通信模块集合,将需要传输的数据发送至具备物理网卡的第二中央处理器,进而可以通过第二中央处理器将该数据传输至网络设备。因此,即使电子设备中某一中央处理器不具备网卡能力,也可以通过该中央处理器所控制的应用程序访问网络资源。In the embodiment of the present disclosure, the data sending unit obtains the shared data sent by the first central processor through a cross-core communication module set; the instruction response unit responds to the data transmission instruction and transmits the shared data to the network device based on the physical network card. Therefore, when data needs to be transmitted through the first central processor without a physical network card, the data to be transmitted can be sent to the second central processor with a physical network card by using sockets and a cross-core communication module set. The data can then be transmitted to the network device through the second central processor. Therefore, even if a central processor in an electronic device does not have network card capabilities, network resources can still be accessed through applications controlled by the central processor.
根据本公开的实施例,本公开还提供了一种电子设备、一种数据传输系统、一种可读存储介质和一种计算机程序产品。According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a data transmission system, a readable storage medium, and a computer program product.
图12示出了可以用来实施本公开的实施例的示例电子设备1200的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。12 illustrates a schematic block diagram of an example electronic device 1200 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to refer to various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are examples only and are not intended to limit implementations of the disclosure described and/or claimed herein.
如图12所示,设备1200包括计算单元1201,其可以根据存储在只读存储器(ROM)1202中的计算机程序或者从存储单元1208加载到随机访问存储器(RAM)1203中的计算机程序,来执行各种适当的动作和处理。在RAM1203中,还可存储设备1200操作所需的各种程序和数据。计算单元1201、ROM 1202以及RAM 1203通过总线1204彼此相连。输入/输出(I/O)接口1205也连接至总线1204。As shown in FIG. 12 , the device 1200 includes a computing unit 1201 that can execute according to a computer program stored in a read-only memory (ROM) 1202 or loaded from a storage unit 1208 into a random access memory (RAM) 1203 Various appropriate actions and treatments. In the RAM 1203, various programs and data required for the operation of the device 1200 can also be stored. The computing unit 1201, the ROM 1202 and the RAM 1203 are connected to each other via a bus 1204. An input/output (I/O) interface 1205 is also connected to bus 1204.
设备1200中的多个部件连接至I/O接口1205,包括:输入单元1206,例如键盘、鼠标等;输出单元1207,例如各种类型的显示器、扬声器等;存储单元1208,例如磁盘、光盘等;以及通信单元1209,例如网卡、调制解调器、无线通信收发机等。通信单元1209允许设备1200通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the device 1200 are connected to the I/O interface 1205, including: input unit 1206, such as a keyboard, mouse, etc.; output unit 1207, such as various types of displays, speakers, etc.; storage unit 1208, such as a magnetic disk, optical disk, etc. ; and communication unit 1209, such as a network card, modem, wireless communication transceiver, etc. The communication unit 1209 allows the device 1200 to exchange information/data with other devices through computer networks such as the Internet and/or various telecommunications networks.
计算单元1201可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元1201的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元1201执行上文所描述的各个方法和处理,例如网络分享方法。例如,在一些实施例中,网络分享方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元1208。在一些实施例中,计算机程序的部分或者全部可以经由ROM 1202和/或通信单元1209而被载入和/或安装到设备1200上。当计算机程序加载到RAM 1203并由计算单元1201执行时,可以执行上文描述的网络分享方法的一个或多个步骤。备选地,在其他实施例中,计算单元1201可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行网络分享方法。Computing unit 1201 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1201 performs various methods and processes described above, such as the network sharing method. For example, in some embodiments, the network sharing method may be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 1208. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1200 via ROM 1202 and/or communication unit 1209 . When the computer program is loaded into the RAM 1203 and executed by the computing unit 1201, one or more steps of the network sharing method described above may be performed. Alternatively, in other embodiments, the computing unit 1201 may be configured to perform the network sharing method in any other suitable manner (eg, by means of firmware).
本文中以上描述的数据传输系统包括第一中央处理器和第二中央处理器。其中,第一中央处理器未设置物理网卡,第二中央处理器设置有物理网卡,该第一中央处理器执行网络分享方法时用于执行上述图3至图5所示的步骤,该第一中央处理器执行网络分享方法时用于执行上述图6所示的步骤。The data transmission system described above herein includes a first central processor and a second central processor. Among them, the first central processor is not provided with a physical network card, and the second central processor is provided with a physical network card. When executing the network sharing method, the first central processor is used to perform the steps shown in FIGS. 3 to 5 above. The first central processor is configured with a physical network card. The central processing unit is used to perform the above steps shown in Figure 6 when executing the network sharing method.
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip implemented in a system (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or a combination thereof. These various embodiments may include implementation in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor The processor, which may be a special purpose or general purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device. An output device.
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions specified in the flowcharts and/or block diagrams/ The operation is implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of this disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein may be implemented on a computer having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer. Other kinds of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and may be provided in any form, including Acoustic input, voice input or tactile input) to receive input from the user.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、互联网和区块链网络。The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., A user's computer having a graphical user interface or web browser through which the user can interact with implementations of the systems and technologies described herein), or including such backend components, middleware components, or any combination of front-end components in a computing system. The components of the system may be interconnected by any form or medium of digital data communication (eg, a communications network). Examples of communication networks include: local area network (LAN), wide area network (WAN), the Internet, and blockchain networks.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务("Virtual Private Server",或简称"VPS")中,存在的管理难度大,业务扩展性弱的缺陷。服务器也可以为分布式系统的服务器,或者是结合了区块链的服务器。Computer systems may include clients and servers. Clients and servers are generally remote from each other and typically interact over a communications network. The relationship of client and server is created by computer programs running on corresponding computers and having a client-server relationship with each other. The server can be a cloud server, also known as cloud computing server or cloud host. It is a host product in the cloud computing service system to solve the problem of traditional physical host and VPS service ("Virtual Private Server", or "VPS" for short) Among them, there are defects such as difficult management and weak business scalability. The server can also be a distributed system server or a server combined with a blockchain.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that various forms of the process shown above may be used, with steps reordered, added or deleted. For example, each step described in the present disclosure can be executed in parallel, sequentially, or in a different order. As long as the desired results of the technical solution disclosed in the present disclosure can be achieved, there is no limitation here.
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the scope of the present disclosure. It will be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions are possible depending on design requirements and other factors. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this disclosure shall be included in the protection scope of this disclosure.
Claims (13)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210293935.8A CN116846977A (en) | 2022-03-23 | 2022-03-23 | Network sharing method and device, system, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210293935.8A CN116846977A (en) | 2022-03-23 | 2022-03-23 | Network sharing method and device, system, electronic equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116846977A true CN116846977A (en) | 2023-10-03 |
Family
ID=88158407
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210293935.8A Pending CN116846977A (en) | 2022-03-23 | 2022-03-23 | Network sharing method and device, system, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116846977A (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120159235A1 (en) * | 2010-12-20 | 2012-06-21 | Josephine Suganthi | Systems and Methods for Implementing Connection Mirroring in a Multi-Core System |
| CN102809743A (en) * | 2012-07-17 | 2012-12-05 | 西安电子科技大学 | Transmission control protocol (TCP)-based full-duplex communication external radiation source radar data transmission display and control method |
| WO2014186189A1 (en) * | 2013-05-15 | 2014-11-20 | Citrix Systems, Inc. | System and method for reducing denial of service attacks against dynamically generated next secure records |
| CN105518620A (en) * | 2014-10-31 | 2016-04-20 | 华为技术有限公司 | Network card configuration method and resource management center |
| CN113296718A (en) * | 2021-07-27 | 2021-08-24 | 阿里云计算有限公司 | Data processing method and device |
-
2022
- 2022-03-23 CN CN202210293935.8A patent/CN116846977A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120159235A1 (en) * | 2010-12-20 | 2012-06-21 | Josephine Suganthi | Systems and Methods for Implementing Connection Mirroring in a Multi-Core System |
| CN102809743A (en) * | 2012-07-17 | 2012-12-05 | 西安电子科技大学 | Transmission control protocol (TCP)-based full-duplex communication external radiation source radar data transmission display and control method |
| WO2014186189A1 (en) * | 2013-05-15 | 2014-11-20 | Citrix Systems, Inc. | System and method for reducing denial of service attacks against dynamically generated next secure records |
| CN105518620A (en) * | 2014-10-31 | 2016-04-20 | 华为技术有限公司 | Network card configuration method and resource management center |
| CN113296718A (en) * | 2021-07-27 | 2021-08-24 | 阿里云计算有限公司 | Data processing method and device |
Non-Patent Citations (1)
| Title |
|---|
| 冯瑞青: ""异构处理器多操作系统协同技术研究"", 《计算机系统应用》, 31 August 2018 (2018-08-31) * |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN114884956B (en) | Implementation method, device and multi-cluster architecture system of multi-cluster architecture | |
| CN114518969A (en) | Inter-process communication method, system, storage medium and computer device | |
| CN113612643B (en) | Network configuration method, device, equipment and storage medium of cloud mobile phone | |
| JP7393468B2 (en) | Data synchronization methods, devices, electronic devices, storage media and computer programs | |
| WO2023082716A1 (en) | Method and apparatus for operating android application in linux system, and device | |
| CN115567594A (en) | Microservice request processing method, device, computer equipment and storage medium | |
| CN111343239B (en) | Communication request processing method, communication request processing device and transaction system | |
| WO2023179715A1 (en) | Data channel construction method and apparatus | |
| CN111143017B (en) | Cloud operation system interaction processing method, client and cloud operation system | |
| CN112929183B (en) | Intelligent network card, message transmission method, device, equipment and storage medium | |
| US11784946B2 (en) | Method for improving data flow and access for a neural network processor | |
| WO2023093016A1 (en) | Cloud code development system, method, and apparatus, device, and storage medium | |
| WO2014067258A1 (en) | Cloud service triggering method, cloud server and thin client | |
| WO2023179801A1 (en) | Data processing method and apparatus, communication system, electronic device, and storage medium | |
| CN116846977A (en) | Network sharing method and device, system, electronic equipment and storage medium | |
| JP2025131564A (en) | Data processing method, device, equipment, and medium applied to a distributed system | |
| CN114780470B (en) | Cloud mobile phone management system, method, device, electronic equipment and readable storage medium | |
| CN115883676A (en) | A data packet transmission method, device, electronic equipment and storage medium | |
| CN117615042A (en) | Data communication method, device, computer equipment and storage medium | |
| CN117294773A (en) | Data transmission method, device, equipment and storage medium | |
| CN117194068A (en) | Cross-process data transmission method, system, equipment and storage medium | |
| CN117424883A (en) | Energy storage system control device and energy storage system | |
| CN116847316A (en) | Data transmission method and device, electronic equipment and storage medium | |
| CN116614383A (en) | Model updating method, device, electronic device and storage medium | |
| CN114281478B (en) | Container operation method and device, electronic equipment and computer storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |