CN116112306B - Decentralizing network interaction method, device, equipment and storage medium - Google Patents

Decentralizing network interaction method, device, equipment and storage medium Download PDF

Info

Publication number
CN116112306B
CN116112306B CN202310085059.4A CN202310085059A CN116112306B CN 116112306 B CN116112306 B CN 116112306B CN 202310085059 A CN202310085059 A CN 202310085059A CN 116112306 B CN116112306 B CN 116112306B
Authority
CN
China
Prior art keywords
server
virtual
node
memory address
memory
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
CN202310085059.4A
Other languages
Chinese (zh)
Other versions
CN116112306A (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.)
Guangdong Baolun Electronics Co ltd
Original Assignee
Guangdong Baolun Electronics Co 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 Guangdong Baolun Electronics Co ltd filed Critical Guangdong Baolun Electronics Co ltd
Priority to CN202310085059.4A priority Critical patent/CN116112306B/en
Publication of CN116112306A publication Critical patent/CN116112306A/en
Application granted granted Critical
Publication of CN116112306B publication Critical patent/CN116112306B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2801Broadband local area networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0273Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using web services for network management, e.g. simple object access protocol [SOAP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5041Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a decentralizing network interaction method, a device, equipment and a storage medium, which divide the service function of a server into a plurality of sub-service functions and distribute the sub-service functions to a plurality of terminals connected with the server, wherein each terminal corresponds to a server node; initiating network access invitations to all server nodes based on preset proxy nodes so that each server node is added into a network in turn to form a virtual server; creating a virtual memory for a virtual server, acquiring a mapping memory address in the virtual memory of a physical memory address of each server node, and correspondingly distributing the mapping memory address to each server node; dividing the virtual memory to obtain a shared memory, and interacting each server node based on the shared memory and the mapping memory address; compared with the prior art, the technical scheme of the invention distributes the service function of the server to the operation of the terminal rows, realizes the decentralization and improves the interaction efficiency between the server nodes.

Description

Decentralizing network interaction method, device, equipment and storage medium
Technical Field
The present invention relates to the field of local area network networking technologies, and in particular, to a method, an apparatus, a device, and a storage medium for decentralizing network interaction.
Background
The existing lan networking service generally consists of a master node and a plurality of slave nodes, with the master node as a center, and all other slave nodes are connected to the master node for cluster service. For example, a cluster includes three slave nodes a, b and c and a master node, and all three slave nodes a, b and c need to be directly connected to the master node and communicate with each other through the master node.
In this master-slave mode, the slave nodes do not know each other's resource allocation condition, if when a request is sent to one of the slave nodes, such as node b, node b has no resource capable of meeting the request, the master node needs to inquire which server node can meet the resource of the request is, and then the master node completes the scheduling of the corresponding slave server node. In such a way, coordination among the slave server nodes is not timely enough, and response time to the request is prolonged; meanwhile, in the master-slave mode, the master node is not burdened with the increase of the slave nodes, and the number of the slave nodes is limited.
Disclosure of Invention
The invention aims to solve the technical problems that: the network interaction method, the device, the equipment and the storage medium for decentralization are provided, the decentralization is realized by distributing the service functions of the server to the terminal for operation, and the interaction efficiency between server nodes is improved.
In order to solve the technical problems, the invention provides a network interaction method for decentralization, which comprises the following steps:
the method comprises the steps of obtaining and dividing a service function of a server into a plurality of sub-service functions, and distributing the sub-service functions to a plurality of terminals connected with the server so that each terminal carries and runs a preset number of sub-service functions, wherein each terminal corresponds to a server node;
initiating network access invitations to all server nodes based on preset proxy nodes so that each server node is added into a network in turn to form a virtual server;
creating a virtual memory for the virtual server, acquiring a physical memory address of each server node, mapping the physical memory address in the virtual memory based on a mapping server so as to obtain a mapping memory address of the physical memory address, and correspondingly distributing the mapping memory address to each server node based on the proxy node;
dividing the virtual memory to obtain a shared memory, and starting the virtual server based on the proxy node so that each server node interacts with the shared memory based on the mapping memory address in the virtual server.
In one possible implementation manner, the service function of the server is acquired and divided into a plurality of sub-service functions, which specifically includes:
the method comprises the steps of obtaining the number of terminals connected with a server, and dividing the service function of the server into a plurality of sub-service functions according to a preset service function dividing mode based on the number of the terminals, wherein the preset service function dividing mode comprises dividing according to functions.
In one possible implementation manner, a network access invitation is initiated to all server nodes based on a preset proxy node, so that each server node is sequentially added into a network, and the method specifically includes:
selecting any server node from all server nodes, setting the selected any server node as a first server node, and setting the rest server nodes in all server nodes as a second server node set;
controlling the first server node to initiate network access invitation to each second server node in the second server node set, so that each second server node replies corresponding second server node addresses to the first server node after receiving the network access invitation;
when the first server node receives the second server node address, acknowledgement feedback is sent to a second server node corresponding to the second server node address based on the second server node address;
and adding the second server nodes into the network in turn based on the time when the second server nodes receive the confirmation feedback, and coding all server node arrangement nodes based on the sequence of adding each second server into the network.
In one possible implementation manner, creating a virtual memory for the virtual server specifically includes:
and acquiring all server nodes in the virtual server, dividing memory blocks from terminals corresponding to each server node respectively, and integrating all memory blocks to obtain the virtual memory of the virtual server.
In one possible implementation manner, a physical memory address of each server node is obtained, and the physical memory address is mapped in the virtual memory based on a mapping server, so that a mapped memory address of the physical memory address is obtained, which specifically includes:
acquiring a physical memory address of each server node, and mapping the physical memory address in the virtual memory based on a memory mapping function of each server node so as to obtain a first mapped memory address of the physical memory address;
and setting a number corresponding to the first mapping memory address and the physical memory address one by one, and setting the first physical memory address after the number is set as the mapping memory address.
In one possible implementation manner, after the virtual server is formed, the method further includes:
acquiring all terminals corresponding to all server nodes in the virtual server, acquiring terminal functions corresponding to all terminals, classifying all terminals based on the terminal functions, and obtaining all class terminals corresponding to each class;
and selecting a preset number of first terminals from any one of all the class terminals, setting the first terminals as primary terminals, and setting all the class terminals except the first terminals as secondary terminals.
In one possible implementation manner, after the virtual server is formed, the method further includes:
when a new server node is added into the virtual server, a virtual memory is created for the virtual server again, and the mapping memory address of the physical memory address of each server node in the virtual memory is obtained.
The invention also provides a decentralised network interaction device, comprising: the system comprises a server function dividing module, a virtual server constructing module, a memory address mapping module and a shared memory constructing module;
the server function dividing module is used for acquiring and dividing a service function of a server into a plurality of sub-service functions, and distributing the plurality of sub-service functions to a plurality of terminals connected with the server so that each terminal carries a preset number of sub-service functions, wherein each terminal corresponds to one server node;
the virtual server construction module is used for initiating network access invitations to all server nodes based on preset proxy nodes so that each server node is added into a network in turn to form a virtual server;
the memory address mapping module is configured to create a virtual memory for the virtual server, obtain a physical memory address of each server node, map the physical memory address in the virtual memory based on a mapping server, so as to obtain a mapped memory address of the physical memory address, and correspondingly distribute the mapped memory address to each server node based on the proxy node;
the shared memory construction module is used for dividing the virtual memory to obtain a shared memory, and starting the virtual server based on the proxy node so that each server node interacts with the shared memory based on the mapping memory address in the virtual server.
In one possible implementation manner, the server function dividing module is configured to obtain and divide a service function of a server into a plurality of sub-service functions, and specifically includes:
the method comprises the steps of obtaining the number of terminals connected with a server, and dividing the service function of the server into a plurality of sub-service functions according to a preset service function dividing mode based on the number of the terminals, wherein the preset service function dividing mode comprises dividing according to functions.
In one possible implementation manner, the virtual server construction module is configured to initiate an invitation to access the network to all server nodes based on a preset proxy node, so that each server node is sequentially added to the network, and specifically includes:
selecting any server node from all server nodes, setting the selected any server node as a first server node, and setting the rest server nodes in all server nodes as a second server node set;
controlling the first server node to initiate network access invitation to each second server node in the second server node set, so that each second server node replies corresponding second server node addresses to the first server node after receiving the network access invitation;
when the first server node receives the second server node address, acknowledgement feedback is sent to a second server node corresponding to the second server node address based on the second server node address;
and adding the second server nodes into the network in turn based on the time when the second server nodes receive the confirmation feedback, and coding all server node arrangement nodes based on the sequence of adding each second server into the network.
In one possible implementation manner, the memory address mapping module is configured to create a virtual memory for the virtual server, and specifically includes:
and acquiring all server nodes in the virtual server, dividing memory blocks from terminals corresponding to each server node respectively, and integrating all memory blocks to obtain the virtual memory of the virtual server.
In one possible implementation manner, the memory address mapping module is configured to obtain a physical memory address of each server node, map the physical memory address in the virtual memory based on a mapping server, so as to obtain a mapped memory address of the physical memory address, and specifically includes:
acquiring a physical memory address of each server node, and mapping the physical memory address in the virtual memory based on a memory mapping function of each server node so as to obtain a first mapped memory address of the physical memory address;
and setting a number corresponding to the first mapping memory address and the physical memory address one by one, and setting the first physical memory address after the number is set as the mapping memory address.
In one possible implementation manner, the virtual server building module is further configured to:
acquiring all terminals corresponding to all server nodes in the virtual server, acquiring terminal functions corresponding to all terminals, classifying all terminals based on the terminal functions, and obtaining all class terminals corresponding to each class;
and selecting a preset number of first terminals from any one of all the class terminals, setting the first terminals as primary terminals, and setting all the class terminals except the first terminals as secondary terminals.
In one possible implementation manner, the invention provides a network interaction device with decentralization, which further includes: a virtual server update module;
and the virtual server updating module is used for creating a virtual memory for the virtual server again when a new server node is added into the virtual server, and obtaining the mapping memory address in the virtual memory of the physical memory address of each server node.
The invention provides a terminal device, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor realizes the network interaction method of decentralizing any one of the above when executing the computer program.
The invention provides a computer readable storage medium, which comprises a stored computer program, wherein when the computer program runs, equipment where the computer readable storage medium is located is controlled to execute the network interaction method of decentralizing any one of the above.
Compared with the prior art, the network interaction method, device, equipment and storage medium for decentralization have the following beneficial effects:
dividing the service function of the server into a plurality of sub-service functions and distributing the sub-service functions to a plurality of terminals connected with the server, wherein each terminal corresponds to a server node; initiating network access invitations to all server nodes based on preset proxy nodes so that each server node is added into a network in turn to form a virtual server; creating a virtual memory for a virtual server, acquiring a mapping memory address in the virtual memory of a physical memory address of each server node, and correspondingly distributing the mapping memory address to each server node; dividing the virtual memory to obtain a shared memory, and interacting each server node based on the shared memory and the mapping memory address; compared with the prior art, the technical scheme of the invention distributes the service functions of the server to the terminal for running in a plurality of rows, realizes the decentralization, constructs the virtual server based on the server nodes corresponding to the terminals, can effectively solve the problem of limiting the number of the sub-nodes in the networking, and improves the timeliness and the efficiency of interaction among the server nodes based on the sharing of the memory resources.
Drawings
FIG. 1 is a flow chart of an embodiment of a method of decentralizing network interactions provided by the present invention;
fig. 2 is a schematic structural diagram of an embodiment of a network interaction device with decentralization according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of a network interaction method for decentralization, as shown in fig. 1, and the method includes steps 101 to 104, specifically as follows:
step 101: the method comprises the steps of obtaining and dividing a service function of a server into a plurality of sub-service functions, and distributing the plurality of sub-service functions to a plurality of terminals connected with the server, so that each terminal carries and runs a preset number of sub-service functions, wherein each terminal corresponds to one server node.
In an embodiment, the number of terminals connected to a server is obtained, and based on the number of terminals, a service function of the server is divided into a plurality of sub-service functions according to a preset service function dividing mode, wherein the preset service function dividing mode includes dividing according to functions.
In one embodiment, since a server is composed of a plurality of small functions, when the service functions of the server are divided according to functions, the service functions of the server are divided based on the analyzed functions by performing functional analysis on the service functions of the server; as an illustration in this embodiment: the server functions of a broadcasting system can be provided with a plurality of sub-service functions such as ringing, timing tasks, broadcasting, intercom, system task scheduling, system displaying and the like based on the function analysis of the server functions, so that the server functions are divided into the ringing, the timing tasks, the broadcasting, the intercom, the system task scheduling, the system displaying and the like.
Preferably, the preset service function dividing mode further comprises dividing according to code storage addresses in a code slicing mode; the preset service function dividing mode can be divided according to threads or processes.
In an embodiment, for the number of the plurality of sub-service functions that are divided, the number of the plurality of sub-service functions is allocated according to the number of the terminals to obtain the number of allocated sub-service functions, and the number of sub-services of the allocated sub-service functions can be allocated to each terminal, so that the terminal can operate one sub-service function in addition to its own operation.
Preferably, the number of the terminals is at least 3, but if the capacity of the terminals is larger, the number of the terminals can be set to be at least 3, and if the capacity of the terminals is smaller, the number of the terminals can be set to be at least 3.
In the embodiment, as all the service functions are divided into a plurality of sub-service functions, the pressure caused by that one server processes data independently can be reduced, each device is ensured to operate under the most average and most efficient resource occupation, the resource occupation can be dynamically regulated, and the performance equipartition and the efficiency equipartition can be realized; and for the operation mode of the embedded terminal, the operation mode is a mode of adding a plurality of terminals to the server, namely, the plurality of terminals exist in the operation mode, and the residual performance of the terminal can be effectively utilized by distributing the service function of the server to each terminal, so that the processing efficiency is improved; the method avoids the problem that all service functions are assembled on one server in the prior art, and not only is the server required to be high in configuration and good in performance, but also the processing pressure of the server is easy to be high.
Step 102: and initiating network access invitations to all server nodes based on preset proxy nodes so that each server node is sequentially added into a network to form a virtual server.
In an embodiment, any one of the server nodes is selected from all the server nodes, and the selected any one of the server nodes is set as a first server node, and the rest of the server nodes are set as a second server node set.
In an embodiment, the first server node is controlled to initiate a network access invitation to each second server node in the second server node set, so that each second server node replies a corresponding second server node address to the first server node after receiving the network access invitation; when the first server node receives the second server node address, acknowledgement feedback is sent to a second server node corresponding to the second server node address based on the second server node address; and adding the second server nodes into the network in turn based on the time when the second server nodes receive the confirmation feedback, and coding all server node arrangement nodes based on the sequence of adding each second server into the network.
In one embodiment, since the service function of the server is transferred to each terminal in the network, when all terminals in the network operate, a virtual server is formed based on a plurality of small service functions carried by each terminal, and each terminal depends on each other but is independent from each other; only after all terminals are successfully combined, the functions of the server are formed, and the effect of decentralization is realized.
In an embodiment, when more terminals are in the network, the terminal function of each terminal is obtained, and the terminals with the same terminal function are divided into primary and secondary terminals, so that the function operation can be effectively switched and shared, abnormal operation of the system caused by the fault of a certain terminal is avoided, and the operation reliability of the system is improved.
Specifically, all terminals corresponding to all server nodes in the virtual server are obtained, terminal functions corresponding to all terminals are obtained, and all terminals are classified based on the terminal functions to obtain all class terminals corresponding to each class; and selecting a preset number of first terminals from any one of all the class terminals, setting the first terminals as primary terminals, and setting all the class terminals except the first terminals as secondary terminals.
Step 103: creating a virtual memory for the virtual server, acquiring a physical memory address of each server node, mapping the physical memory address in the virtual memory based on a mapping server so as to obtain a mapping memory address of the physical memory address, and correspondingly distributing the mapping memory address to each server node based on the proxy node.
In an embodiment, since the running memory is required for the running of the server, and in this embodiment, the service function of the server is already allocated to each terminal, that is, the server is removed, then the running memory is required for the running process of the constructed virtual server, and based on this, in this embodiment, the corresponding memory is obtained from the terminals forming the virtual server as the virtual memory of the virtual server.
Specifically, all server nodes in the virtual server are obtained, memory blocks are respectively divided from terminals corresponding to each server node, and all memory blocks are integrated to obtain the virtual memory of the virtual server.
In an embodiment, the memories are corresponding to addresses, but different terminals, that is, the standards corresponding to the memory addresses of different server nodes, only belong to the terminals, if the memories corresponding to the server nodes are collected, multiple addresses with the same name may appear, so that the memory addresses corresponding to each server node are difficult to distinguish correctly, and therefore, in the embodiment, unified management needs to be performed on the memory addresses corresponding to each server node, so that each server node is allocated with a unique memory address again.
Specifically, a physical memory address of each server node is obtained, and the physical memory address is mapped in the virtual memory based on a memory mapping function of each server node, so that a first mapped memory address of the physical memory address is obtained;
setting one-to-one corresponding numbers for the first mapping memory address and the physical memory address, setting the first physical memory address after the numbers are set as the mapping memory address to acquire the physical memory address of each server node, and simultaneously acquiring the virtual memory address of the virtual memory; and reallocating a first physical memory address to the physical memory address based on the virtual memory address, setting a number corresponding to the first physical memory address and the physical memory address one by one based on the memory mapping function of each server node, and setting the first physical memory address after the number is set as a virtual mapping address. Each terminal has a memory mapping function, and numbers the own actual physical memory address and the first physical memory address in a one-to-one correspondence.
In one embodiment, the running process of the virtual server is a continuous address scheduling process, and once the virtual server runs to a certain virtual mapping address, the virtual server returns to run on the mapped physical memory address according to the virtual mapping address.
Preferably, when the address mapping of each server node is completed, the virtual mapping address is used when the server runs, so that the memory mapping function can be uniformly managed regardless of which server node is actually the address of.
In an embodiment, when cross-platform memory mapping is required, a virtual mapping address of a physical address of a server node in the virtual memory of a current platform is obtained, an external address allocated by an administrator is obtained, according to the external address, an external virtual mapping address of the external address in the virtual memory of the external platform is obtained, and based on the virtual mapping address and the external virtual mapping address, an entire running address is obtained, and based on the running address, cross-platform memory mapping is realized.
Step 104: dividing the virtual memory to obtain a shared memory, and starting the virtual server based on the proxy node so that each server node interacts with the shared memory based on the mapping memory address in the virtual server.
In one embodiment, a region is divided in the virtual memory as a shared memory, and access and data interaction of each server node are provided through the shared memory.
In an embodiment, each server node operates in the shared memory to implement the operation of the virtual server. And a convenient interaction mode is formed.
In an embodiment, since the number of server nodes of the virtual server is not fixed, when a new server node is added to the virtual server, a virtual memory needs to be created again for the virtual server based on the new added new server node, and a virtual mapping address in the virtual memory of a physical memory address of each server node is obtained.
Preferably, when the virtual memory is created for the virtual server again, a new memory block is directly divided from the new server, and the new memory block is added into the virtual memory of the original virtual server, so that the virtual memory of the virtual server is updated.
Example 2
Referring to fig. 2, fig. 2 is a schematic structural diagram of an embodiment of a network interaction device with decentralization, and as shown in fig. 2, the device includes a server function dividing module 201, a virtual server building module 202, a memory address mapping module 203, and a shared memory building module 204, which are specifically as follows:
the server function dividing module 201 is configured to obtain and divide a service function of a server into a plurality of sub-service functions, and distribute the plurality of sub-service functions to a plurality of terminals connected to the server, so that each terminal carries a preset number of sub-service functions, where each terminal corresponds to one server node.
The virtual server construction module 202 is configured to initiate a network access invitation to all server nodes based on a preset proxy node, so that each server node is sequentially added to the network to form a virtual server.
The memory address mapping module 203 is configured to create a virtual memory for the virtual server, obtain a physical memory address of each server node, map the physical memory address in the virtual memory based on a mapping server, so as to obtain a mapped memory address of the physical memory address, and correspondingly distribute the mapped memory address to each server node based on the proxy node.
The shared memory construction module 204 is configured to divide the virtual memory to obtain a shared memory, and start the virtual server based on the proxy node, so that each server node interacts with the shared memory based on the mapped memory address in the virtual server.
In an embodiment, the server function dividing module 201 is configured to obtain and divide a service function of a server into a plurality of sub-service functions, and specifically includes: the method comprises the steps of obtaining the number of terminals connected with a server, and dividing the service function of the server into a plurality of sub-service functions according to a preset service function dividing mode based on the number of the terminals, wherein the preset service function dividing mode comprises dividing according to functions.
In an embodiment, the virtual server construction module 202 is configured to initiate an invitation to access the network to all server nodes based on a preset proxy node, so that each server node is sequentially added to the network, and specifically includes: selecting any server node from all server nodes, setting the selected any server node as a first server node, and setting the rest server nodes in all server nodes as a second server node set; controlling the first server node to initiate network access invitation to each second server node in the second server node set, so that each second server node replies corresponding second server node addresses to the first server node after receiving the network access invitation; when the first server node receives the second server node address, acknowledgement feedback is sent to a second server node corresponding to the second server node address based on the second server node address; and adding the second server nodes into the network in turn based on the time when the second server nodes receive the confirmation feedback, and coding all server node arrangement nodes based on the sequence of adding each second server into the network.
In one embodiment, the memory address mapping module 203 is configured to create a virtual memory for the virtual server, and specifically includes: and acquiring all server nodes in the virtual server, dividing memory blocks from terminals corresponding to each server node respectively, and integrating all memory blocks to obtain the virtual memory of the virtual server.
In an embodiment, the memory address mapping module 203 is configured to obtain a physical memory address of each server node, map the physical memory address in the virtual memory based on a mapping server, so as to obtain a mapped memory address of the physical memory address, and specifically includes: acquiring a physical memory address of each server node, and mapping the physical memory address in the virtual memory based on a memory mapping function of each server node so as to obtain a first mapped memory address of the physical memory address; and setting a number corresponding to the first mapping memory address and the physical memory address one by one, and setting the first physical memory address after the number is set as the mapping memory address.
In one embodiment, the virtual server construction module 202 is further configured to: acquiring all terminals corresponding to all server nodes in the virtual server, acquiring terminal functions corresponding to all terminals, classifying all terminals based on the terminal functions, and obtaining all class terminals corresponding to each class; and selecting a preset number of first terminals from any one of all the class terminals, setting the first terminals as primary terminals, and setting all the class terminals except the first terminals as secondary terminals.
The network interaction device with decentralization provided in this embodiment further includes: a virtual server update module; and the virtual server updating module is used for creating a virtual memory for the virtual server again when a new server node is added into the virtual server, and obtaining the virtual mapping address in the virtual memory of the physical memory address of each server node.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method embodiment for the specific working process of the above-described apparatus, which is not described in detail herein.
It should be noted that the above embodiment of the network interaction device with decentralization is only illustrative, where the modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
On the basis of the embodiment of the decentralizing network interaction method, another embodiment of the present invention provides a decentralizing network interaction terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor executes the computer program to implement the decentralizing network interaction method of any one of the embodiments of the present invention.
Illustratively, in this embodiment the computer program may be partitioned into one or more modules, which are stored in the memory and executed by the processor to perform the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function for describing the execution of the computer program in the decentralized network interactive terminal device.
The network interaction terminal equipment with the decentralization function can be computing equipment such as a desktop computer, a notebook computer, a palm computer, a cloud server and the like. The de-centralized network interactive terminal device may include, but is not limited to, a processor, a memory.
The processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital SignalProcessor, DSP), application specific integrated circuits (Application SpecificIntegrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general processor may be a microprocessor or the processor may be any conventional processor, etc., which is a control center of the decentralized network interactive terminal device, and connects various parts of the entire decentralized network interactive terminal device using various interfaces and lines.
The memory may be used to store the computer program and/or the module, and the processor may implement various functions of the de-centralized network interactive terminal device by running or executing the computer program and/or the module stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the cellular phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
On the basis of the embodiment of the decentralizing network interaction method, another embodiment of the invention provides a storage medium, which includes a stored computer program, wherein when the computer program runs, a device where the storage medium is controlled to execute the decentralizing network interaction method according to any embodiment of the invention.
In this embodiment, the storage medium is a computer-readable storage medium, and the computer program includes computer program code, where the computer program code may be in a source code form, an object code form, an executable file, or some intermediate form, and so on. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random AccessMemory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
In summary, the invention discloses a method, a device, equipment and a storage medium for decentralizing network interaction, which divide a service function of a server into a plurality of sub-service functions and distribute the sub-service functions to a plurality of terminals connected with the server, wherein each terminal corresponds to a server node; initiating network access invitations to all server nodes based on preset proxy nodes so that each server node is added into a network in turn to form a virtual server; creating a virtual memory for a virtual server, acquiring a virtual mapping address in the virtual memory of a physical memory address of each server node, and correspondingly distributing the virtual mapping address to each server node; dividing the virtual memory to obtain a shared memory, and interacting each server node based on the shared memory and the virtual mapping address. Compared with the prior art, the technical scheme of the invention distributes the service function of the server to the operation of the terminal rows, realizes the decentralization and improves the interaction efficiency between the server nodes.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and substitutions can be made by those skilled in the art without departing from the technical principles of the present invention, and these modifications and substitutions should also be considered as being within the scope of the present invention.

Claims (10)

1. A method of decentralized network interaction, comprising:
the method comprises the steps of obtaining and dividing a service function of a server into a plurality of sub-service functions, and distributing the sub-service functions to a plurality of terminals connected with the server so that each terminal carries and runs a preset number of sub-service functions, wherein each terminal corresponds to a server node;
initiating network access invitations to all server nodes based on preset proxy nodes so that each server node is added into a network in turn to form a virtual server;
creating a virtual memory for the virtual server, acquiring a physical memory address of each server node, mapping the physical memory address in the virtual memory based on a mapping server so as to obtain a mapping memory address of the physical memory address, and correspondingly distributing the mapping memory address to each server node based on the proxy node;
dividing the virtual memory to obtain a shared memory, and starting the virtual server based on the proxy node so that each server node interacts with the shared memory based on the mapping memory address in the virtual server.
2. The method for decentralized network interaction according to claim 1, wherein the step of obtaining and dividing the service function of the server into a plurality of sub-service functions comprises:
the method comprises the steps of obtaining the number of terminals connected with a server, and dividing the service function of the server into a plurality of sub-service functions according to a preset service function dividing mode based on the number of the terminals, wherein the preset service function dividing mode comprises dividing according to functions.
3. The method for decentralized network interaction according to claim 1, wherein the step of initiating a network access invitation to all server nodes based on a preset proxy node so that each server node is added to the network in turn comprises:
selecting any server node from all server nodes, setting any selected server node as a proxy node, and setting the rest server nodes in all server nodes as a second server node set;
controlling the proxy node to initiate network access invitation to each second server node in the second server node set, so that each second server node replies corresponding second server node addresses to the proxy node after receiving the network access invitation;
when the proxy node receives the second server node address, sending confirmation feedback to a second server node corresponding to the second server node address based on the second server node address;
and adding the second server nodes into the network in turn based on the time when the second server nodes receive the confirmation feedback, and coding all server node arrangement nodes based on the sequence of adding each second server into the network.
4. The method for decentralized network interaction according to claim 1, wherein creating virtual memory for the virtual server comprises:
and acquiring all server nodes in the virtual server, dividing memory blocks from terminals corresponding to each server node respectively, and integrating all memory blocks to obtain the virtual memory of the virtual server.
5. The method for decentralized network interaction according to claim 1, wherein the step of obtaining the physical memory address of each server node, and mapping the physical memory address in the virtual memory based on the mapping server so as to obtain the mapped memory address of the physical memory address, specifically comprises:
acquiring a physical memory address of each server node, and mapping the physical memory address in the virtual memory based on a memory mapping function of each server node so as to obtain a first mapped memory address of the physical memory address;
and setting a number corresponding to the first mapping memory address and the physical memory address one by one, and setting the first physical memory address after the number is set as the mapping memory address.
6. The method for decentralized network interaction according to claim 1, wherein after constructing the virtual server, further comprising:
acquiring all terminals corresponding to all server nodes in the virtual server, acquiring terminal functions corresponding to all terminals, classifying all terminals based on the terminal functions, and obtaining all class terminals corresponding to each class;
and selecting a preset number of first terminals from any one of all the class terminals, setting the first terminals as primary terminals, and setting all the class terminals except the first terminals as secondary terminals.
7. The method for decentralized network interaction according to claim 1, wherein after constructing the virtual server, further comprising:
when a new server node is added into the virtual server, a virtual memory is created for the virtual server again, and the mapping memory address of the physical memory address of each server node in the virtual memory is obtained.
8. A de-centralized network interaction device, comprising: the system comprises a server function dividing module, a virtual server constructing module, a memory address mapping module and a shared memory constructing module;
the server function dividing module is used for acquiring and dividing a service function of a server into a plurality of sub-service functions, and distributing the plurality of sub-service functions to a plurality of terminals connected with the server so that each terminal carries a preset number of sub-service functions, wherein each terminal corresponds to one server node;
the virtual server construction module is used for initiating network access invitations to all server nodes based on preset proxy nodes so that each server node is added into a network in turn to form a virtual server;
the memory address mapping module is configured to create a virtual memory for the virtual server, obtain a physical memory address of each server node, map the physical memory address in the virtual memory based on a mapping server, so as to obtain a mapped memory address of the physical memory address, and correspondingly distribute the mapped memory address to each server node based on the proxy node;
the shared memory construction module is used for dividing the virtual memory to obtain a shared memory, and starting the virtual server based on the proxy node so that each server node interacts with the shared memory based on the mapping memory address in the virtual server.
9. A terminal device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the decentralised network interaction method as claimed in any one of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored computer program, wherein the computer program, when run, controls a device in which the computer readable storage medium is located to perform the de-centralized network interaction method according to any one of claims 1 to 7.
CN202310085059.4A 2023-02-08 2023-02-08 Decentralizing network interaction method, device, equipment and storage medium Active CN116112306B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310085059.4A CN116112306B (en) 2023-02-08 2023-02-08 Decentralizing network interaction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310085059.4A CN116112306B (en) 2023-02-08 2023-02-08 Decentralizing network interaction method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116112306A CN116112306A (en) 2023-05-12
CN116112306B true CN116112306B (en) 2024-02-13

Family

ID=86265154

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310085059.4A Active CN116112306B (en) 2023-02-08 2023-02-08 Decentralizing network interaction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116112306B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239227A (en) * 2013-06-20 2014-12-24 杭州华三通信技术有限公司 Virtualization storage management device and local virtualization storage management device and method
WO2018171423A1 (en) * 2017-03-21 2018-09-27 中兴通讯股份有限公司 Method and apparatus for constructing video multicast virtual network
CN110727499A (en) * 2019-09-18 2020-01-24 平安科技(深圳)有限公司 Resource data acquisition method and device, computer equipment and storage medium
CN111724451A (en) * 2020-06-09 2020-09-29 中国科学院苏州生物医学工程技术研究所 Tomographic image reconstruction acceleration method, system, terminal and storage medium based on cloud computing
CN113296926A (en) * 2020-05-29 2021-08-24 阿里巴巴集团控股有限公司 Resource allocation method, computing device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239227A (en) * 2013-06-20 2014-12-24 杭州华三通信技术有限公司 Virtualization storage management device and local virtualization storage management device and method
WO2018171423A1 (en) * 2017-03-21 2018-09-27 中兴通讯股份有限公司 Method and apparatus for constructing video multicast virtual network
CN110727499A (en) * 2019-09-18 2020-01-24 平安科技(深圳)有限公司 Resource data acquisition method and device, computer equipment and storage medium
WO2021051880A1 (en) * 2019-09-18 2021-03-25 平安科技(深圳)有限公司 Resource data acquisition method and apparatus, computer device and storage medium
CN113296926A (en) * 2020-05-29 2021-08-24 阿里巴巴集团控股有限公司 Resource allocation method, computing device and storage medium
CN111724451A (en) * 2020-06-09 2020-09-29 中国科学院苏州生物医学工程技术研究所 Tomographic image reconstruction acceleration method, system, terminal and storage medium based on cloud computing

Also Published As

Publication number Publication date
CN116112306A (en) 2023-05-12

Similar Documents

Publication Publication Date Title
US10652319B2 (en) Method and system for forming compute clusters using block chains
CN114244717B (en) Configuration method and device of virtual network card resources, computer equipment and medium
CN112231049A (en) Computing equipment sharing method, device, equipment and storage medium based on kubernets
CN111078404B (en) Computing resource determining method and device, electronic equipment and medium
WO2016095524A1 (en) Resource allocation method and apparatus
CN113220432B (en) Multi-cloud interconnection method, device, equipment, storage medium and product
CN110795202B (en) Resource allocation method and device of virtualized cluster resource management system
CN108540408B (en) Openstack-based distributed virtual switch management method and system
CN111124640A (en) Task allocation method and system, storage medium and electronic device
CN113886058A (en) Cross-cluster resource scheduling method and device
CN112261125B (en) Centralized unit cloud deployment method, device and system
CN109413117B (en) Distributed data calculation method, device, server and computer storage medium
CN116112306B (en) Decentralizing network interaction method, device, equipment and storage medium
CN109582242B (en) Address determination method and device for cascade memory array system and electronic equipment
CN116436968A (en) Service grid communication method, system, device and storage medium
CN112714146A (en) Resource scheduling method, device, equipment and computer readable storage medium
CN115809292A (en) Data processing method, device, equipment and medium
CN111106971B (en) Device registration management method, device and computer-readable storage medium
CN110362575B (en) Method and device for generating global index of data
CN110209475B (en) Data acquisition method and device
CN108958878B (en) Container-based network equipment operation control method and device
CN111309467A (en) Task distribution method and device, electronic equipment and storage medium
CN105187244A (en) Access management system of digital communication equipment supporting multiple management modes
CN115242754B (en) Information return method, request response method, message sending method and device
CN115643558B (en) Data processing method and device, electronic equipment and 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
CB02 Change of applicant information

Address after: No. 56 Nanli East Road, Shiqi Town, Panyu District, Guangzhou City, Guangdong Province, 510000

Applicant after: Guangdong Baolun Electronics Co.,Ltd.

Address before: No. 19, Chuangyuan Road, Zhongcun Street, Panyu District, Guangzhou City, Guangdong Province, 511495

Applicant before: GUANGZHOU ITC ELECTRONIC TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant