CN114528114B - Data processing method, device and equipment - Google Patents

Data processing method, device and equipment Download PDF

Info

Publication number
CN114528114B
CN114528114B CN202011241722.8A CN202011241722A CN114528114B CN 114528114 B CN114528114 B CN 114528114B CN 202011241722 A CN202011241722 A CN 202011241722A CN 114528114 B CN114528114 B CN 114528114B
Authority
CN
China
Prior art keywords
container
sub
network
request message
target
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.)
Active
Application number
CN202011241722.8A
Other languages
Chinese (zh)
Other versions
CN114528114A (en
Inventor
蒋伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN202011241722.8A priority Critical patent/CN114528114B/en
Publication of CN114528114A publication Critical patent/CN114528114A/en
Application granted granted Critical
Publication of CN114528114B publication Critical patent/CN114528114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the application provides a data processing method, a device and equipment, which are applied to terminal equipment, wherein the terminal equipment comprises a root container and at least one sub-container, the root container comprises a cross-process communication driver and a system program, the sub-container comprises an application program, and the method comprises the following steps: obtaining a network request message through a first sub-container, wherein the at least one sub-container comprises the first sub-container, and the network request message comprises an identification of the first sub-container; starting the cross-process communication driver in the root container according to the network request message; and loading the system program to the first sub-container through the cross-process communication driver, wherein the system program is used for processing network services corresponding to the first sub-container. The reliability of network data processing is improved.

Description

Data processing method, device and equipment
Technical Field
Embodiments of the present application relate to the field of communications technologies, and in particular, to a data processing method, apparatus, and device.
Background
The terminal device can run a plurality of systems, and the terminal device can access network services through the plurality of systems.
The terminal device may comprise a root container and a plurality of sub-containers, different sub-containers corresponding to different systems, the terminal device accessing the network service through the root container and any one of the sub-containers, for example: control and allocate network card resources, load network services of the system, and execute network access tasks of users. In the prior art, the physical network card and the network card driver are usually disposed in the root container, and in addition, a virtual network card and a network card driver are disposed in each container, where the network cards are connected by a bridge, and when the terminal device sends network data to the target network address through the first system, the terminal device can send network data to the root container through the first sub-container and the bridge of the root container, and the terminal device sends network data to the target network address through the root container.
However, the network address of each sub-container may be different from the network address of the terminal device, for example, the physical address of each sub-container is an address of a virtual network card, the internet protocol (Internet Protocol, IP) address is an address allocated by a bridge, the network address of the terminal device is a network address of a network card in a root container, and when an application program that needs to bind the physical address and the IP address is installed in the terminal device, the terminal device cannot transmit network data through the application program, resulting in low reliability of network data processing.
Disclosure of Invention
The embodiment of the application provides a data processing method, a device and equipment, which are used for improving the reliability of network data processing.
In a first aspect, an embodiment of the present application provides a data processing method, applied to a terminal device, where the terminal device includes a root container and at least one sub-container, the root container includes a cross-process communication driver and a system program, and the sub-container includes an application program, and the method includes:
obtaining a network request message through a first sub-container, wherein the at least one sub-container comprises the first sub-container, and the network request message comprises an identification of the first sub-container;
starting the cross-process communication driver in the root container according to the network request message;
and loading the system program to the first sub-container through the cross-process communication driver, wherein the system program is used for processing network services corresponding to the first sub-container.
In one possible implementation, loading the system program to the first sub-container through the cross-process communication driver includes:
acquiring the identification of the first sub-container;
Acquiring the system program in the root container;
and loading the system program to the first sub-container through the cross-process communication driver according to the identification of the first sub-container.
In one possible implementation, loading the system program to the first sub-container through the cross-process communication driver according to the identification of the first sub-container includes:
determining a target storage area corresponding to the first sub-container in a hard disk of the terminal equipment according to the identification of the first sub-container;
and loading the system program to the target storage area through the cross-process communication driver.
In one possible implementation manner, the network request message is a data transmission request message, and the method further includes:
processing the data transmission request message through a system program in the first sub-container according to the data transmission request message to obtain a first network data packet, wherein the first network data packet comprises an identifier of the first sub-container and a network address of target equipment;
and sending the first network data packet to the target equipment.
In one possible implementation manner, according to the network request message, the system program in the first sub-container processes the network request message to obtain a first network data packet, where the processing includes:
Determining a target program in the system program;
loading the target program in the hard disk into the cache of the first sub-container;
and processing the service request message according to the target program in the cache to obtain the first network data packet.
In one possible embodiment, the method further comprises:
receiving a second network data packet sent by a second device, wherein the second network data packet comprises a network address of the second device;
determining a target sub-container according to the second network data packet;
and sending the second network data packet to the target sub-container through the root container.
In one possible implementation manner, determining a target sub-container according to the second network data packet includes:
judging whether a preset corresponding relation exists or not, wherein the preset corresponding relation comprises an identifier of the sub-container and a network address of the second equipment;
if yes, determining the target sub-container according to the preset corresponding relation and the second network data packet;
if not, determining the sub-container corresponding to the currently displayed system as the target sub-container.
In a second aspect, an embodiment of the present application provides a data processing apparatus applied to a terminal device, where the terminal device includes a root container and at least one sub-container, the root container includes a cross-process communication driver and a system program, the sub-container includes an application program, and the apparatus includes:
An acquisition module, configured to acquire a network request message through a first sub-container, where the at least one sub-container includes the first sub-container, and the network request message includes an identifier of the first sub-container;
the starting module is used for starting the cross-process communication driver in the root container according to the network request message;
and the loading module is used for loading the system program to the first sub-container through the cross-process communication driver, and the system program is used for processing the network service corresponding to the first sub-container.
In one possible implementation manner, the loading module is specifically configured to:
acquiring the identification of the first sub-container;
acquiring the system program in the root container;
and loading the system program to the first sub-container through the cross-process communication driver according to the identification of the first sub-container.
In one possible implementation manner, the loading module is specifically configured to:
determining a target storage area corresponding to the first sub-container in a hard disk of the terminal equipment according to the identification of the first sub-container;
and loading the system program to the target storage area through the cross-process communication driver.
In one possible implementation manner, the network request message is a data transmission request message, and the apparatus further includes:
the processing module is used for processing the data transmission request message through a system program in the first sub-container according to the data transmission request message to obtain a first network data packet, wherein the first network data packet comprises an identifier of the first sub-container and a network address of target equipment;
and the first sending module is used for sending the first network data packet to the target equipment.
In a possible implementation manner, the processing module is specifically configured to:
determining a target program in the system program;
loading the target program in the hard disk into the cache of the first sub-container;
and processing the service request message according to the target program in the cache to obtain the first network data packet.
In one possible embodiment, the apparatus further comprises:
the receiving module is used for receiving a second network data packet sent by second equipment, wherein the second network data packet comprises a network address of the second equipment;
the determining module is used for determining a target sub-container according to the second network data packet;
And the second sending module is used for sending the second network data packet to the target sub-container through the root container.
In one possible implementation manner, the determining module is specifically configured to:
judging whether a preset corresponding relation exists or not, wherein the preset corresponding relation comprises an identifier of the sub-container and a network address of the second equipment;
if yes, determining the target sub-container according to the preset corresponding relation and the second network data packet;
if not, determining the sub-container corresponding to the currently displayed system as the target sub-container.
In one possible implementation of the method according to the application,
in a third aspect, an embodiment of the present application provides a terminal device, including: at least one processor and memory;
the memory is used for storing computer program instructions;
the at least one processor is configured to execute the computer program instructions stored in the memory, to cause the terminal device to perform the method according to any one of the first aspect above.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium having stored therein computer program instructions which, when executed by a processor, perform a method according to any of the first aspects above.
The embodiment of the application provides a data processing method, a device and equipment, which are applied to terminal equipment, wherein the terminal equipment comprises a root container and at least one sub-container, the root container comprises a cross-process communication driver and a system program, the sub-container comprises an application program, when the terminal equipment processes network data, a network request message can be acquired through a first sub-container, the network request message comprises an identifier of the first sub-container, the cross-process communication driver in the root container is started according to the network request message, and the system program is loaded to the first sub-container through the cross-process communication driver, so that the network data in the first sub-container can be processed through the system program. In the process, a virtual network card is not required to be arranged in each container, and network data is processed in a network bridge mode, so that the network address of each system of the terminal equipment is the network address of the real network card, and the reliability of network data processing is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it will be obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is an application scenario diagram of a data processing method according to an embodiment of the present application;
fig. 2 is a schematic architecture diagram of a terminal device according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a data processing method according to an embodiment of the present application;
fig. 4 is a schematic flow chart of acquiring a network address according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating another data processing method according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating another data processing method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
FIG. 8 is a schematic diagram of another data processing apparatus according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a data processing apparatus according to another embodiment of the present application;
fig. 10 is a schematic hardware structure of a data processing device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Fig. 1 is an application scenario diagram of a data processing method according to an embodiment of the present application. Referring to fig. 1, including a terminal device 100 and a server 110, the terminal device 100 may include, but is not limited to, a smart phone, a tablet computer, a personal digital assistant, and the like. The terminal device 100 may provide a plurality of systems and a user may log into a different system of the terminal device 100 for network data processing. For example, the terminal device 100 may provide a first system and a second system, and the user may log in the first system to perform network data processing, or may log in the second system to perform network data processing. The server 110 may provide network services to different systems of the terminal device 100, for example, the terminal device 100 may transmit a network request message to the server 110 through the first system, and the server 110 may transmit a network response message to the first system of the terminal device 100 according to the network request message.
The terminal device 100 may include a root container and a plurality of sub-containers, where each sub-container corresponds to a system, and the terminal device 100 may perform processing of network data through the root container and any one of the sub-containers, for example, controlling and allocating network card resources, loading network services of the system, or performing network access tasks of a user.
In the prior art, the physical network card and the network card driver are usually disposed in the root container, and in addition, a virtual network card and a network card driver are disposed in each container, and the network cards are connected by means of a bridge, when the terminal device 100 sends a network request message to the server 110 through the first system, the terminal device 100 may send the network request message to the root container through the bridge of the first sub-container and the root container, and the terminal device 100 sends the network request message to the server 110 through the root container. However, since the physical address of each sub-container is the address of the virtual network card, the IP address is the address allocated by the bridge according to the preset rule, resulting in that the physical address and the IP address of each system are not the physical address and the IP address of the real terminal device 100. For example, the terminal device 100 may provide a first system and a second system, the real IP address of the terminal device 100 is 192.168.1.1, the physical address is 08-2E-5F-1B-DC-7A, the IP addresses allocated by bridges of the first system and the second system may be 192.168.1.2 and 192.168.1.3, and the physical addresses of the first system and the second system may be C4-85-08-22-E8-C2 and 64-27-37-60-74-C7.
Therefore, when an application program requiring binding of a physical address and an IP address is installed in the terminal device 100, the terminal device 100 cannot transmit network data through the application program, resulting in lower reliability of network data processing. In this regard, the present application improves upon the method of network data processing.
It should be noted that the above application scenario is merely illustrative of one possible application scenario, and is not limited to the scene scenario.
In order to solve the above technical problems, the architecture of the terminal device according to the present application will be described with reference to fig. 2.
Fig. 2 is a schematic architecture diagram of a terminal device according to an embodiment of the present application. Referring to fig. 2, a root container 101 and at least one sub-container 102 are provided in a terminal device 100, and two sub-containers (sub-container 102a, sub-container 102 b) are illustrated in the drawing. The terminal device 100 can isolate the processes and the resources in a virtualized manner, so as to obtain corresponding containers, the processes and the resources in different containers can be completely independent, and data interaction can be performed between different containers in an inter-process communication manner. The root container 101 may store a system program including a driver for loading various services of the system and controlling and allocating hardware resources, and a system service program, for example, the driver may include a Network card driver, a cross-process communication driver, etc., and the system service program may include a Network Daemon (Netd) in which an application program is provided for each sub-container 102 for performing tasks of a user.
The technical scheme shown in the application is described in detail by specific examples. It should be noted that the following embodiments may be combined with each other, and for the same or similar matters, the description will not be repeated in different embodiments.
Fig. 3 is a flow chart of a data processing method according to an embodiment of the present application. Referring to fig. 3, the method may include:
s301, acquiring a network request message through a first sub-container.
The execution body of the embodiment of the application can be a terminal device and can be a data processing device arranged in the terminal device. Alternatively, the data processing apparatus may be implemented by software, or may be implemented by a combination of software and hardware. For convenience of description, the following description will take an execution subject as a terminal device as an example.
The terminal equipment can be terminal equipment such as a smart phone, a tablet personal computer and the like. The terminal device is provided with a root container and at least one sub-container. A container is a virtualized module and terminal devices can isolate different resources and processes through different containers. Different sub-containers correspond to different systems. For example, when the terminal device may provide a first system and a second system, the terminal device may be provided with a first sub-container and a second sub-container, where the first sub-container corresponds to the first system and the second sub-container corresponds to the second system. Alternatively, the at least one sub-container may comprise a first sub-container.
In the application, a cross-process communication driver and a system program are arranged in a root container, and an application program is arranged in a sub-container, wherein the system program can be used for loading various services of a system, controlling and distributing hardware resources, and the application program can be used for executing various tasks of a user. Alternatively, the system program may include a driver and a system service program, for example, the driver may be a network card driver, and the system service program may be a web daemon Netd.
The network request message is used to request access to a network service, for example, the network request message may include, but is not limited to, network parameter acquisition information, network parameter modification information, network data transmission information, or network data reception information. The network parameter obtaining information is used for obtaining network parameters of the terminal equipment, and the network parameters can include an IP address of the terminal equipment, a physical address of the terminal equipment, network bandwidth information, traffic statistics, network route configuration information, shared network data and the like. The network parameter modification information is used to modify a network parameter of the terminal device, and the terminal device may modify the network parameter according to the network parameter modification information, for example, the terminal device may modify an IP address of the network, modify a network authority, and the like. The network data transmission information is used to transmit network data to other devices through the network, for example, the terminal device may transmit a request for accessing a network service to the server through the network. The network data receiving information is used for receiving network data sent by other devices, for example, the terminal device may receive a service response message sent by the server through the network.
Optionally, the identification of the sub-container may be included in the network request message. For example, the network request message acquired through the first sub-container may include an identifier of the first sub-container, and the identifier of the first sub-container may be sub-container 1.
Alternatively, the network request message may be acquired through the first sub-container by the following possible implementation manner: when the terminal equipment starts the first system, the terminal equipment starts the first sub-container and the root container, and correspondingly, a driver in the root container and a system service program start to run; the terminal equipment acquires the network request message through the first sub-container. Optionally, the terminal device may obtain the network request message through a setting option in the first sub-container, and the terminal device may also obtain the network request message through an application program in the first sub-container.
S302, starting a cross-process communication driver in the root container according to the network request message.
The cross-process communication (InterProcess Communication, IPC) driver is for performing data transfer between at least two containers, e.g. the child container and the root container may transfer data by way of cross-process communication. Alternatively, the ways of IPC may include adhesive Binder, pipe FIFO, message Queue, semaphore, shared Memory, etc. For example, when the IPC is in the manner of a Binder, the terminal device may send the data in the root container to the child container through the Binder driver.
Alternatively, the cross-process communication driver in the root container may be started by the following possible implementations: and acquiring the identification of the first sub-container according to the network request message, and starting the cross-process communication driver in the root container according to the identification of the first sub-container.
S303, loading the system program to the first sub-container through the cross-process communication driver.
The system program is used for processing the network service corresponding to the first sub-container. Optionally, when the first system provided by the terminal device is an android system, the system program may include Netd, where Netd is used to perform network management and network control, for example, netd may implement functions of Firewall setting, network address translation NAT, bandwidth control, wireless network card access, network device binding, service searching, service name resolution, and so on.
Alternatively, the system program may be loaded into the first sub-container through the cross-process communication driver by the following possible implementation: acquiring an identification of a first sub-container; acquiring a system program in a root container; and loading the system program to the first sub-container through the cross-process communication driver according to the identification of the first sub-container.
For example, when the identifier of the first sub-container is sub-container 1 and the system program is the Netd program, the terminal device may obtain the identifier of the first sub-container, obtain the Netd program in the root container, and load the Netd program into the first sub-container according to the sub-container 1 through the inter-process communication driver.
Optionally, when the system program is loaded to the first sub-container through the cross-process communication driver, a target storage area corresponding to the first sub-container may be determined in a hard disk of the terminal device according to the identifier of the first sub-container; and loading the system program into the target storage area through the cross-process communication driver.
Next, a procedure for the terminal device to acquire the network address through the setting option in the first sub-container will be described with reference to fig. 4 by taking the network address acquired through the first sub-container as an example.
Fig. 4 is a schematic flow chart of acquiring a network address, including a page 4A-page 4C, where the terminal device may include a first system and a second system, and it is assumed that a user logs in the terminal device through the first system.
Referring to page 4A, when the terminal device obtains the network address through the first system, the user obtains the network request message of the user through the first sub-container corresponding to the first system, where the network request message is used to obtain the network address of the terminal device. For example, the user may click on a setup option in the first system.
Referring to page 4B, a plurality of tags may be included under the setup option, for example, may include a cell phone storage, a processor, a running memory, a network status message, etc. For different information that can be clicked on different labels to view the terminal device. For example, the user may click on the label "network status message" under the setting option to obtain the network address of the terminal device.
Referring to page 4C, after the user clicks the "network status message", the terminal device may start the cross-process communication driver according to the network request message, and load the system program to the first sub-container through the cross-process communication driver, for example, the terminal device loads Netd to the first sub-container, and the Netd may process the network request message to obtain the network status message of the terminal device, referring to page 4C, the IP address of the terminal device is 10.113.92.123, and the physical address is 13:3c:c3:cd:dc:e9, in the embodiment shown in fig. 4, since the system program is loaded to the first sub-container through the cross-process communication driver when the network address is obtained, the network address of the terminal device can be obtained through the system program, and the network address of the terminal device obtained through the system program is the real network address of the network card, so that the network address obtained through the first sub-container is the real network address of the network card.
The embodiment of the application provides a data processing method, which is applied to terminal equipment, wherein the terminal equipment comprises a root container and at least one sub-container, the root container comprises a cross-process communication driving program and a system program, the sub-container comprises an application program, when the terminal equipment processes network data, a network request message can be acquired through a first sub-container, the network request message comprises an identifier of the first sub-container, the cross-process communication driving program in the root container is started according to the network request message, and the system program is loaded to the first sub-container through the cross-process communication driving program, so that the network data in the first sub-container can be processed through the system program. In the process, a virtual network card is not required to be arranged in each container, and network data is processed in a network bridge mode, so that the network address of each system of the terminal equipment is the network address of the real network card, and the reliability of network data processing is improved.
Based on any one of the foregoing embodiments, a detailed description will be given below of another data processing method provided by an embodiment of the present application, taking a network request message as an example of a data transmission request message, with reference to fig. 5.
Fig. 5 is a flowchart of another data processing method according to an embodiment of the present application. Referring to fig. 5, the method may include:
s501, acquiring a data transmission request message through a first sub-container.
It should be noted that, the execution process of S501 may refer to the execution process of S301, and will not be described herein.
S502, starting a cross-process communication driver in the root container according to the data transmission request message.
It should be noted that, the execution process of S502 may refer to the execution process of S302, and will not be described herein.
S503, loading the system program to the first sub-container through the cross-process communication driver.
It should be noted that, the execution of S503 may refer to the execution of S303, and will not be described herein.
S504, according to the data transmission request message, the data transmission request message is processed through the system program in the first sub-container, and a first network data packet is obtained.
The first network data packet includes the identifier of the first sub-container and the network address of the target device, where the network address of the target device may be the target IP address, and the format of the first network data packet may be as shown in table 1.
TABLE 1
Identification of sub-containers Protocol type Source IP address Target IP address Data length Data
Sub-container 1 TCP IP1 IP2 Data length 1 Data 1
It should be noted that table 1 is merely illustrative of one possible format of network data packets, and is not limited to the format of network data packets.
S505, the first network data packet is sent to the target device.
The target device may be a server, a smart phone, a desktop computer, etc., and the present application is not limited in particular.
Optionally, when the terminal device sends the first network data packet to the target device, the terminal device may determine the target program in the system program; loading a target program in a hard disk into a cache of a first sub-container; and processing the service request message according to the target program in the cache to obtain a first network data packet.
For example, the system program may include a Netd program, a network card driver, a monitoring system security configuration program, an automatic playing hardware event program, etc., and the target program determined by the terminal device in the system program may be one or more, for example, the target program may be a Netd program and a network card driver. The terminal equipment loads the Netd program and the network card driver in the hard disk into the cache of the first sub-container, and the terminal equipment can process the service request message through the Netd program and the network card driver in the cache, so that a second network data packet is obtained. The Netd program is used for processing network data, for example, the terminal device can realize network bandwidth control, traffic passing, hot spot sharing, network address conversion, routing table configuration and the like through the Netd program, and the terminal device can control and use the network card through the network card driver.
Alternatively, the terminal device may include a network communication module, and the terminal device may send the first network data packet to the target device through the network communication module. For example, the network communication module may include a wireless fidelity (Wireless Fidelity, wiFi) module or a Modem.
Alternatively, when the terminal device performs a system switch, for example, when the terminal device switches from the first system to the second system, the terminal device may delete the system program in the first sub-container, and specifically, the terminal device may delete the system program in the target storage area in the first sub-container. When the terminal device performs network data processing through the second system, the terminal device may perform the method shown in any one of the foregoing embodiments, which is not described herein.
The embodiment of the application provides a data processing method, which is applied to terminal equipment, wherein the terminal equipment comprises a root container and at least one sub-container, the root container comprises a cross-process communication driving program and a system program, the sub-container comprises an application program, when the terminal equipment processes network data, a network request message can be acquired through a first sub-container, the network request message comprises an identifier of the first sub-container, the cross-process communication driving program in the root container is started according to the network request message, and the system program is loaded to the first sub-container through the cross-process communication driving program, so that the network data in the first sub-container can be processed through the system program. In the process, a virtual network card is not required to be arranged in each container, and network data is processed in a network bridge mode, so that the network address of each system of the terminal equipment is the network address of the real network card, and the reliability of network data processing is improved.
On the basis of any one of the above embodiments, a further data processing method provided by an embodiment of the present application will be described in detail below with reference to fig. 6, taking an example that a terminal device receives network data.
Fig. 6 is a flowchart of another data processing method according to an embodiment of the present application. Referring to fig. 6, the method may include:
s601, acquiring a data transmission request message through a first sub-container.
It should be noted that, the execution process of S601 may refer to the execution process of S301, and will not be described herein.
S602, starting a cross-process communication driver in the root container according to the data transmission request message.
It should be noted that, the execution process of S602 may refer to the execution process of S302, which is not described herein.
S603, loading the system program to the first sub-container through the cross-process communication driver.
It should be noted that, the execution process of S603 may refer to the execution process of S303, which is not described herein.
S604, receiving a second network data packet sent by the second device.
The second device may be in network communication with the terminal device, e.g., the second device may include a server, a smart phone, a desktop computer, a tablet computer, etc. The network address of the second device is different from the network address of the terminal device.
The second network data packet may include a network address of the second device, which may be an IP address of the second device. For example, the format of the second network packet may be as shown in table 2.
TABLE 2
Protocol type Source IP address Target IP address Data length Data
UDP IP2 IP1 Data length 2 Data 2
It should be noted that table 2 is merely illustrative of one possible format of network data packets, and is not meant to limit the format of network data packets.
S605, determining a target sub-container according to the second network data packet.
When the terminal device includes a plurality of systems, the different systems correspond to different sub-containers, and the terminal device may include a plurality of sub-containers. When the terminal device receives the network data, the terminal device needs to determine the sub-container that receives the network data, i.e., the terminal device needs to determine the target sub-container. For example, when the terminal device includes a first system and a second system, upon receiving the network data, the terminal device may determine a target sub-container that receives the network data, e.g., the target sub-container may be a first sub-container.
Optionally, when the terminal device determines the target sub-container according to the second network data packet, it may determine whether a preset corresponding relationship exists, where the preset corresponding relationship includes an identifier of the sub-container and a network address of the second device, and the network address may be an IP address; if yes, determining a target sub-container according to a preset corresponding relation and the second network data packet; if not, determining the sub-container corresponding to the currently displayed system as the target sub-container.
Optionally, when a preset corresponding relationship exists in the terminal device, the preset corresponding relationship may be as shown in table 3:
TABLE 3 Table 3
Identification of sub-containers IP address of second device
Sub-container 1 192.168.1.10
Sub-container 2 192.168.2.33
Sub-container 3 192.168.3.68
Sub-container 1 192.168.5.20
…… ……
It should be noted that table 3 is merely an example to illustrate the preset correspondence between the identifier of the sub-container and the IP address of the second device, and is not limited to the preset correspondence between the identifier of the sub-container and the IP address of the second device.
For example, when the IP address of the second device is 192.168.1.10, the terminal device may determine that the target sub-container is sub-container 1 according to the preset correspondence; when the IP address of the second device is 192.168.2.33, the terminal device may determine that the target sub-container is sub-container 2 according to the preset correspondence; when the IP address of the second device is 192.168.3.68, the terminal device may determine that the target sub-container is sub-container 3 according to the preset correspondence; when the IP address of the second device is 192.168.5.20, the terminal device may determine that the target sub-container is sub-container 1 according to the preset correspondence.
Optionally, when the preset corresponding relation does not exist in the terminal device, the terminal device obtains a sub-container corresponding to the currently displayed system, and determines that the sub-container is a target sub-container. For example, the sub-container corresponding to the currently displayed system is sub-container 2, and the target sub-container is sub-container 2.
S606, sending the second network data packet to the target sub-container through the root container.
Optionally, after the second network data packet is sent to the target sub-container through the root container, the terminal device may further delete the preset correspondence between the identifier of the sub-container and the IP address of the second device.
The embodiment of the application provides a data processing method, which is applied to terminal equipment, wherein the terminal equipment comprises a root container and at least one sub-container, the root container comprises a cross-process communication driving program and a system program, the sub-container comprises an application program, when the terminal equipment processes network data, a network request message can be acquired through a first sub-container, the network request message comprises an identifier of the first sub-container, the cross-process communication driving program in the root container is started according to the network request message, and the system program is loaded to the first sub-container through the cross-process communication driving program, so that the network data in the first sub-container can be processed through the system program. In the process, a virtual network card is not required to be arranged in each container, and network data is processed in a network bridge mode, so that the network address of each system of the terminal equipment is the network address of the real network card, and the reliability of network data processing is improved.
Optionally, on the basis of the foregoing embodiments, the terminal device may further perform network monitoring, network parameter setting, and so on. The network parameter settings may include, among other things, IP address settings, network throughput settings, bandwidth settings, routing table configurations, etc. For specific implementation, reference may be made to the method flow of each embodiment, which is not described herein.
Fig. 7 is a schematic diagram of the result of a data processing apparatus according to an embodiment of the present application, where the terminal apparatus includes a root container and at least one sub-container, the root container includes a cross-process communication driver and a system program, the sub-container includes an application program, and the apparatus 10 includes:
an obtaining module 11, configured to obtain, through a first sub-container, a network request message, where the at least one sub-container includes the first sub-container, and the network request message includes an identifier of the first sub-container;
a starting module 12, configured to start the cross-process communication driver in the root container according to the network request message;
and the loading module 13 is configured to load the system program to the first sub-container through the cross-process communication driver, where the system program is configured to process a network service corresponding to the first sub-container.
The technical scheme shown in the embodiment of the method can be executed by the data processing device provided by the embodiment of the application, and the implementation principle and the beneficial effects are similar, and are not repeated here.
In one possible embodiment, the loading module 13 is specifically configured to:
acquiring the identification of the first sub-container;
acquiring the system program in the root container;
and loading the system program to the first sub-container through the cross-process communication driver according to the identification of the first sub-container.
In one possible embodiment, the loading module 13 is specifically configured to:
determining a target storage area corresponding to the first sub-container in a hard disk of the terminal equipment according to the identification of the first sub-container;
and loading the system program to the target storage area through the cross-process communication driver.
Fig. 8 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present application. On the basis of the embodiment shown in fig. 7, referring to fig. 8, the apparatus 10 further includes:
the processing module 14 is configured to process the data transmission request message through a system program in the first sub-container according to the data transmission request message, so as to obtain a first network data packet, where the first network data packet includes an identifier of the first sub-container and a network address of a target device;
A first sending module 15, configured to send the first network data packet to the target device.
In one possible implementation, the processing module 14 is specifically configured to:
determining a target program in the system program;
loading the target program in the hard disk into the cache of the first sub-container;
and processing the service request message according to the target program in the cache to obtain the first network data packet.
The technical scheme shown in the embodiment of the method can be executed by the data processing device provided by the embodiment of the application, and the implementation principle and the beneficial effects are similar, and are not repeated here.
Fig. 9 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present application. On the basis of the embodiment shown in fig. 8, referring to fig. 9, the apparatus 10 further includes:
a receiving module 16, configured to receive a second network data packet sent by a second device, where the second network data packet includes a network address of the second device;
a determining module 17, configured to determine a target sub-container according to the second network packet;
a second sending module 18, configured to send the second network data packet to the target sub-container through the root container.
In a possible embodiment, the determining module 17 is specifically configured to:
judging whether a preset corresponding relation exists or not, wherein the preset corresponding relation comprises an identifier of the sub-container and a network address of the second equipment;
if yes, determining the target sub-container according to the preset corresponding relation and the second network data packet;
if not, determining the sub-container corresponding to the currently displayed system as the target sub-container.
The technical scheme shown in the embodiment of the method can be executed by the data processing device provided by the embodiment of the application, and the implementation principle and the beneficial effects are similar, and are not repeated here.
Fig. 10 is a schematic hardware structure of a data processing device according to an embodiment of the present application. Referring to fig. 10, the data processing apparatus 20 may include: a processor 21 and a memory 22, wherein the processor 21 and the memory 22 may communicate; the processor 21 and the memory 22 are in communication via a communication bus 23, said memory 22 for storing program instructions, said processor 21 being adapted to invoke the program instructions in the memory for performing the data processing method as shown in any of the method embodiments described above.
Optionally, the data processing device 20 may also include a communication interface, which may include a transmitter and/or a receiver.
Alternatively, the processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The present application provides a readable storage medium having a computer program stored thereon; the computer program is configured to implement the data processing method according to any of the embodiments described above.
Embodiments of the present application provide a computer program product comprising instructions which, when executed, cause a computer to perform the above-described data processing method.
All or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a readable memory. The program, when executed, performs steps including the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape, floppy disk, optical disk, and any combination thereof.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the embodiments of the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims and the equivalents thereof, the present application is also intended to include such modifications and variations.
In the present disclosure, the term "include" and variations thereof may refer to non-limiting inclusion; the term "or" and variations thereof may refer to "and/or". The terms "first," "second," and the like in this specification are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. In the present application, "a plurality of" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the embodiments of the present application, and are not limited thereto; although embodiments of the present application have been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions.

Claims (12)

1. A data processing method, applied to a terminal device, the terminal device comprising a root container and at least one sub-container, the root container comprising a cross-process communication driver and a system program, the sub-container comprising an application program, the method comprising:
obtaining a network request message through a first sub-container, wherein the at least one sub-container comprises the first sub-container, and the network request message comprises an identification of the first sub-container;
starting the cross-process communication driver in the root container according to the network request message;
acquiring the identification of the first sub-container;
Acquiring the system program in the root container;
determining a target storage area corresponding to the first sub-container in a hard disk of the terminal equipment according to the identification of the first sub-container;
and loading the system program to the target storage area through the cross-process communication driver, wherein the system program is used for processing the network service corresponding to the first sub-container.
2. The method of claim 1, wherein the network request message is a data transmission request message, the method further comprising:
processing the data transmission request message through a system program in the first sub-container according to the data transmission request message to obtain a first network data packet, wherein the first network data packet comprises an identifier of the first sub-container and a network address of target equipment;
and sending the first network data packet to the target equipment.
3. The method of claim 2, wherein processing the network request message by the system program in the first sub-container according to the network request message, to obtain a first network data packet, comprises:
Determining a target program in the system program;
loading the target program in the hard disk into the cache of the first sub-container;
and processing the network request message according to the target program in the cache to obtain the first network data packet.
4. The method according to claim 1, wherein the method further comprises:
receiving a second network data packet sent by a second device, wherein the second network data packet comprises a network address of the second device;
determining a target sub-container according to the second network data packet;
and sending the second network data packet to the target sub-container through the root container.
5. The method of claim 4, wherein determining a target sub-container from the second network data packet comprises:
judging whether a preset corresponding relation exists or not, wherein the preset corresponding relation comprises an identifier of the sub-container and a network address of the second equipment;
if yes, determining the target sub-container according to the preset corresponding relation and the second network data packet;
if not, determining the sub-container corresponding to the currently displayed system as the target sub-container.
6. A data processing apparatus for application to a terminal device, the terminal device comprising a root container and at least one sub-container, the root container comprising a cross-process communication driver and a system program, the sub-container comprising an application, the apparatus comprising:
an acquisition module, configured to acquire a network request message through a first sub-container, where the at least one sub-container includes the first sub-container, and the network request message includes an identifier of the first sub-container;
the starting module is used for starting the cross-process communication driver in the root container according to the network request message;
the loading module is used for loading the system program to the first sub-container through the cross-process communication driver, and the system program is used for processing network service corresponding to the first sub-container;
the loading module is specifically configured to:
acquiring the identification of the first sub-container;
acquiring the system program in the root container;
determining a target storage area corresponding to the first sub-container in a hard disk of the terminal equipment according to the identification of the first sub-container;
and loading the system program to the target storage area through the cross-process communication driver.
7. The apparatus of claim 6, wherein the network request message is a data transmission request message, the apparatus further comprising:
the processing module is used for processing the data transmission request message through a system program in the first sub-container according to the data transmission request message to obtain a first network data packet, wherein the first network data packet comprises an identifier of the first sub-container and a network address of target equipment;
and the first sending module is used for sending the first network data packet to the target equipment.
8. The apparatus of claim 7, wherein the processing module is specifically configured to:
determining a target program in the system program;
loading the target program in the hard disk into the cache of the first sub-container;
and processing the network request message according to the target program in the cache to obtain the first network data packet.
9. The apparatus of claim 6, wherein the apparatus further comprises:
the receiving module is used for receiving a second network data packet sent by second equipment, wherein the second network data packet comprises a network address of the second equipment;
The determining module is used for determining a target sub-container according to the second network data packet;
and the second sending module is used for sending the second network data packet to the target sub-container through the root container.
10. The apparatus of claim 9, wherein the determining module is specifically configured to:
judging whether a preset corresponding relation exists or not, wherein the preset corresponding relation comprises an identifier of the sub-container and a network address of the second equipment;
if yes, determining the target sub-container according to the preset corresponding relation and the second network data packet;
if not, determining the sub-container corresponding to the currently displayed system as the target sub-container.
11. A data processing apparatus, comprising: at least one processor and memory;
the memory is used for storing computer program instructions;
the at least one processor is configured to execute the computer program instructions stored in the memory, such that the at least one processor performs the data processing method according to any one of claims 1 to 5.
12. A computer readable storage medium, in which computer program instructions are stored which, when executed by a processor, implement the data processing method according to any of claims 1 to 5.
CN202011241722.8A 2020-11-09 2020-11-09 Data processing method, device and equipment Active CN114528114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011241722.8A CN114528114B (en) 2020-11-09 2020-11-09 Data processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011241722.8A CN114528114B (en) 2020-11-09 2020-11-09 Data processing method, device and equipment

Publications (2)

Publication Number Publication Date
CN114528114A CN114528114A (en) 2022-05-24
CN114528114B true CN114528114B (en) 2023-09-19

Family

ID=81619802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011241722.8A Active CN114528114B (en) 2020-11-09 2020-11-09 Data processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN114528114B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116455770A (en) * 2023-06-16 2023-07-18 北京智芯微电子科技有限公司 Network slice access method, communication entity, communication system and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677935A (en) * 2013-12-23 2014-03-26 北京奇虎科技有限公司 Installation and control method, system and device for application programs
EP2958281A1 (en) * 2013-03-11 2015-12-23 Huawei Technologies Co., Ltd. Container name server and container name analysis method
CN106201527A (en) * 2016-07-15 2016-12-07 北京首都在线科技股份有限公司 A kind of Application Container framework of logic-based subregion
CN106789931A (en) * 2016-11-29 2017-05-31 北京元心科技有限公司 The Network Isolation sharing method and device of multisystem
WO2018058403A1 (en) * 2016-09-29 2018-04-05 Intel Corporation Techniques for movement of data between virtual machines
CN108829384A (en) * 2018-06-13 2018-11-16 平安科技(深圳)有限公司 Management method, device, computer equipment and the storage medium of container
CN111432040A (en) * 2019-01-09 2020-07-17 成都鼎桥通信技术有限公司 Data packet sending method and device for multi-system terminal
CN111885075A (en) * 2020-07-30 2020-11-03 广州华多网络科技有限公司 Container communication method, device, network equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150254248A1 (en) * 2014-03-07 2015-09-10 Printeron Inc. System for suggesting network resource for use by a network terminal based on network resource ranking
US9705923B2 (en) * 2014-09-02 2017-07-11 Symantec Corporation Method and apparatus for automating security provisioning of workloads

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2958281A1 (en) * 2013-03-11 2015-12-23 Huawei Technologies Co., Ltd. Container name server and container name analysis method
CN103677935A (en) * 2013-12-23 2014-03-26 北京奇虎科技有限公司 Installation and control method, system and device for application programs
CN106201527A (en) * 2016-07-15 2016-12-07 北京首都在线科技股份有限公司 A kind of Application Container framework of logic-based subregion
WO2018058403A1 (en) * 2016-09-29 2018-04-05 Intel Corporation Techniques for movement of data between virtual machines
CN106789931A (en) * 2016-11-29 2017-05-31 北京元心科技有限公司 The Network Isolation sharing method and device of multisystem
CN108829384A (en) * 2018-06-13 2018-11-16 平安科技(深圳)有限公司 Management method, device, computer equipment and the storage medium of container
CN111432040A (en) * 2019-01-09 2020-07-17 成都鼎桥通信技术有限公司 Data packet sending method and device for multi-system terminal
CN111885075A (en) * 2020-07-30 2020-11-03 广州华多网络科技有限公司 Container communication method, device, network equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于轻量级虚拟化环境的多级安全容器机制;吉晨;《中国优秀硕士学位论文全文数据库 信息科技辑》(第6期);I138-57 *

Also Published As

Publication number Publication date
CN114528114A (en) 2022-05-24

Similar Documents

Publication Publication Date Title
US10187459B2 (en) Distributed load balancing system, health check method, and service node
CN107278359B (en) Method, host and system for processing message in cloud computing system
AU2016414391B2 (en) Packet processing method in cloud computing system, host, and system
US10698717B2 (en) Accelerator virtualization method and apparatus, and centralized resource manager
US10719369B1 (en) Network interfaces for containers running on a virtual machine instance in a distributed computing environment
WO2016029821A1 (en) Method and device for creating virtual network instance
CN109547531B (en) Data processing method and device and computing equipment
EP3367612A1 (en) Dial testing method, dial testing system, and compute node
CN112416840A (en) Remote mapping method, device and equipment of computing resources and storage medium
US10372633B1 (en) Interconnection of peripheral devices on different electronic devices
CN107133109B (en) Method and device for communication between modules and computing equipment
CN110389711B (en) Method, device, and non-transitory computer-readable medium for assisting endpoint device in implementing SR-IOV functionality
CN111597024B (en) Cross-domain cluster processing method and device, electronic equipment and storage medium
CN114528114B (en) Data processing method, device and equipment
CN113495776A (en) VNF instantiation method and device
CN109698845B (en) Data transmission method, server, unloading card and storage medium
KR101857020B1 (en) Apparatas and method for managing service of providing server in a terminal
EP1993268A2 (en) Method, system and relay device for transmitting packet
CN111614792B (en) Transparent transmission method, system, server, electronic device and storage medium
WO2018057165A1 (en) Technologies for dynamically transitioning network traffic host buffer queues
CN113783963B (en) Data transmission method, server node, gateway equipment and network system
CN110636149A (en) Remote access method, device, router and storage medium
CN111225078B (en) Socket technology-based method for rapidly acquiring KVM virtual machine address
CN114531320A (en) Communication method, device, equipment, system and computer readable storage medium
CN114449025B (en) Communication method and system

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
GR01 Patent grant
GR01 Patent grant