CN116684406A - Content downloading method of intranet equipment - Google Patents

Content downloading method of intranet equipment Download PDF

Info

Publication number
CN116684406A
CN116684406A CN202310945591.9A CN202310945591A CN116684406A CN 116684406 A CN116684406 A CN 116684406A CN 202310945591 A CN202310945591 A CN 202310945591A CN 116684406 A CN116684406 A CN 116684406A
Authority
CN
China
Prior art keywords
intranet
equipment
content
downloading
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310945591.9A
Other languages
Chinese (zh)
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.)
Beijing Chaoge Digital Technology Co ltd
Original Assignee
Beijing Chaoge Digital Technology 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 Beijing Chaoge Digital Technology Co ltd filed Critical Beijing Chaoge Digital Technology Co ltd
Priority to CN202310945591.9A priority Critical patent/CN116684406A/en
Publication of CN116684406A publication Critical patent/CN116684406A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the invention discloses a content downloading method of intranet equipment, which is applied to an intranet system formed by the intranet equipment and comprises the following steps: the intranet system comprises a plurality of intranet devices, each intranet device is provided with an intranet downloading module, and the intranet devices are configured to communicate through a broadcasting protocol; the intranet equipment is configured to have a master equipment state, a slave equipment state or an competitive master equipment state; starting an intranet system, starting an election process of a main device, wherein the selected intranet device is used as a main device, and other intranet devices are slave devices; the intranet system receives a content downloading instruction; the main equipment downloads the corresponding content from the public network according to the instruction, forms a local download address and provides the download content for the auxiliary equipment, and the download address provided by the auxiliary equipment from the main equipment downloads the corresponding content from the local, so that the occupancy rate of public network resources is reduced, the download efficiency is improved, and the real-time performance of content download is improved.

Description

Content downloading method of intranet equipment
Technical Field
The invention belongs to the technical field of computer communication, and particularly relates to a content downloading method of intranet equipment.
Background
At present, the current time of the process,
currently, if a content is delivered to several devices in a physical store through a cloud platform, the general practice is that the devices are connected to the platform, the platform delivers a content downloading instruction to each device, and after receiving the instruction, the devices download the corresponding content through a downloading address in the instruction. In general, the platform is deployed in the public network, and each device needs to download a file from the public network, so that not only is a large amount of public network bandwidth consumed, but also the public network bandwidth is limited, and the real-time performance of content delivery is difficult to ensure.
Disclosure of Invention
In view of this, some embodiments disclose a content downloading method of an intranet device, which is applied to an intranet system formed by the intranet device, and includes:
the intranet system comprises a plurality of intranet devices, each intranet device is provided with an intranet downloading module, and the intranet devices are configured to communicate through a broadcasting protocol; the intranet equipment is configured to have a master equipment state, a slave equipment state or an competitive master equipment state; the intranet equipment in the main equipment state is configured to send heartbeat packets at fixed time and provide downloading content service for other intranet equipment; the intranet equipment in the slave equipment state is configured to receive a heartbeat packet and a downloading instruction of the master equipment; the intranet equipment in the state of the election main equipment is configured to send an instruction of the election main equipment at regular time;
starting an intranet system, starting an election process of a main device, wherein the selected intranet device is used as a main device, and other intranet devices are slave devices;
the intranet system receives a content downloading instruction;
the master device downloads the corresponding content from the public network, and the slave device downloads the corresponding content from the master device.
In the content downloading method of the intranet equipment disclosed in some embodiments, in the election process, a process of performing configuration of the intranet equipment in a main equipment state includes:
periodically sending heartbeat messages;
receiving a broadcast message;
if the instruction message of the competitive master device is received, modifying the master device state into the slave device state;
if heartbeat messages sent by other intranet equipment are received, comparing the session values of the other intranet equipment with the session values of the other intranet equipment:
if the session value of the self is larger than the session values of other intranet devices, the intranet devices continue to serve as the master device;
if the self session value is equal to the session value of other intranet equipment, generating new session again at random, and modifying the self as an election master equipment state;
if the session value of the self is smaller than the session values of other intranet devices, modifying the self as slave devices.
In the content downloading method of the intranet equipment disclosed by some embodiments, the period of sending the heartbeat message by the intranet equipment in the state of the main equipment is set to be 1s.
In the content downloading method of the intranet equipment disclosed by some embodiments, in the election process, the process of performing configuration of the intranet equipment in the slave equipment state includes:
monitoring a broadcast message, and waiting for receiving a heartbeat packet sent by a main device;
receiving a heartbeat packet sent by the main equipment, and recording the id of the main equipment and the time for receiving the heartbeat packet;
if the heartbeat packet sent by the main equipment is not received within the set time period, the state of the heartbeat packet is modified to be the state of the competitive main equipment.
In the content downloading method of the intranet equipment disclosed by some embodiments, the time period for receiving the heartbeat packet sent by the main equipment is set to be 3s.
The content downloading method of the intranet equipment disclosed by some embodiments, the process of performing intranet equipment configuration in the state of the election master equipment comprises the following steps:
receiving messages sent by other intranet equipment during the state of the election main equipment;
transmitting the competitive information according to the set time interval, and transmitting n times;
if the n-time competitive selection messages are successfully sent, modifying the state of the self to be the state of the main equipment; if the n-time competitive choice message is sent unsuccessfully, continuing to be in the competitive choice main equipment state;
if the competition message of other intranet equipment is received, comparing the session value of the competition message with the session value of the other intranet equipment:
if the session value of the self is larger than the session values of other intranet devices, the device is in the state of the election master device continuously;
if the self session value is smaller than the session values of other intranet devices, modifying the self state into the slave device state;
if the self session value is equal to the session value of other intranet equipment, regenerating a new session value, clearing the number of times of sending the competitive message, and resending the competitive message.
In the content downloading method of the intranet equipment disclosed by some embodiments, the time interval of the intranet equipment of the election main equipment for sending the election message is set to be 1s, and the sending times n is set to be 3.
The content downloading method of the intranet equipment disclosed by some embodiments includes the steps that a process of downloading corresponding content from a public network by a main equipment includes:
receiving a content downloading instruction, and downloading corresponding content from the public network according to the address in the instruction;
generating a local download address for externally provided download content;
the method comprises the steps of sending a content downloading message outwards, wherein the content downloading address is a local downloading address generated by a main device;
and in the process of downloading the content from the public network, simultaneously providing external content downloading service until the downloading task is completed.
The content downloading method of the intranet equipment disclosed by some embodiments, a process of downloading corresponding content from the host equipment by the slave equipment comprises the following steps:
receiving a content downloading instruction message, and keeping the name of the message in the local as a task to be downloaded;
receiving a content downloading message sent by a main device, and searching a corresponding task to be downloaded from a locally stored name;
if the corresponding task to be downloaded is found, downloading the corresponding content according to the local download address sent by the main equipment, and if the corresponding task to be downloaded is not found, ignoring the content download message;
and after the content is downloaded, deleting the corresponding task to be downloaded.
According to the content downloading method of the intranet equipment disclosed by the embodiment of the invention, one intranet equipment is selected from a plurality of intranet equipment to serve as a master equipment, other intranet equipment serves as slave equipment, when the intranet equipment receives a downloading instruction, the master equipment downloads corresponding content from a public network according to the instruction, then forms a local downloading address, provides the downloading content for the slave equipment, and the downloading address provided by the slave equipment from the master equipment downloads the corresponding content locally; the intranet equipment only needs to integrate the intranet downloading module to automatically select the main equipment from the intranet equipment, and after the main equipment is offline, other intranet equipment can automatically select new main equipment without artificial interference, so that the operation and maintenance cost is greatly reduced; the main equipment downloads the corresponding content from the public network, and the slave equipment downloads the content from the main equipment through the intranet, so that the consumption of the public network bandwidth is greatly reduced, and the real-time performance of content delivery is also ensured. The content downloading method of the intranet equipment reduces the occupancy rate of public network resources, improves the downloading efficiency and improves the real-time performance of content downloading.
Drawings
Fig. 1 is a flowchart of a content downloading method of an intranet device according to some embodiments;
FIG. 2 illustrates an intranet system topology as disclosed in some embodiments;
FIG. 3 is a flow chart of an intranet device configuration execution task as a master device in an election process disclosed in some embodiments;
FIG. 4 is a flow chart of an election process disclosed in some embodiments as an intranet device configuration of a slave device performing a task;
FIG. 5 is a flow chart of an intranet device configuration execution task of an election host device in an election process disclosed in some embodiments;
FIG. 6 is a flow chart of a master device downloading corresponding content as disclosed in some embodiments;
fig. 7 is a flow chart of downloading corresponding content from a device as disclosed in some embodiments.
Detailed Description
The word "embodiment" as used herein does not necessarily mean that any embodiment described as "exemplary" is preferred or advantageous over other embodiments. Performance index testing in the examples of the present invention, unless otherwise specified, was performed using conventional testing methods in the art. It should be understood that the terminology used in the description of the embodiments of the invention presented is for the purpose of describing particular embodiments only, and is not intended to be limiting of the disclosure of the embodiments of the invention.
Unless otherwise defined, technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which embodiments of the invention belong; other test methods and techniques not specifically identified in the examples of the present invention are those generally employed by those skilled in the art.
The terms "substantially" and "about" are used herein to describe small fluctuations. For example, they may refer to less than or equal to ±5%, such as less than or equal to ±2%, such as less than or equal to ±1%, such as less than or equal to ±0.5%, such as less than or equal to ±0.2%, such as less than or equal to ±0.1%, such as less than or equal to ±0.05%. Numerical data presented or represented herein in a range format is used only for convenience and brevity and should therefore be interpreted flexibly to include not only the numerical values explicitly recited as the limits of the range, but also to include all the individual numerical values or sub-ranges encompassed within that range. For example, a numerical range of "1 to 5%" should be interpreted to include not only the explicitly recited values of 1% to 5%, but also include individual values and sub-ranges within the indicated range. Thus, individual values, such as 2%, 3.5% and 4%, and subranges, such as 1% to 3%, 2% to 4% and 3% to 5%, etc., are included in this numerical range. The same principle applies to ranges reciting only one numerical value. Moreover, such an interpretation applies regardless of the breadth of the range or the characteristics being described.
In this document, including the claims, conjunctions such as "comprising," including, "" carrying, "" having, "" containing, "" involving, "" containing, "and the like are to be construed as open-ended, i.e., to mean" including, but not limited to. Only the conjunctions "consisting of … …" and "consisting of … …" are closed conjunctions.
Numerous specific details are set forth in the following examples in order to provide a better understanding of the present invention. It will be understood by those skilled in the art that the present invention may be practiced without some of these specific details. In the examples, some methods, means, instruments, devices, etc. well known to those skilled in the art are not described in detail in order to highlight the gist of the present invention.
On the premise of no conflict, the technical features disclosed by the embodiment of the invention can be combined at will, and the obtained technical scheme belongs to the disclosure of the embodiment of the invention.
In some embodiments, the content downloading method of the intranet device is applied to an intranet system formed by the intranet devices, and is used for downloading content by the intranet devices, as illustrated in fig. 1, and the downloading method includes:
the intranet system comprises a plurality of intranet devices, each intranet device is provided with an intranet downloading module, and the intranet devices are configured to communicate through a broadcasting protocol; the intranet equipment is configured to have a master equipment state, a slave equipment state or an competitive master equipment state; the intranet equipment in the main equipment state is configured to send heartbeat packets at fixed time and provide downloading content service for other intranet equipment; the intranet equipment in the slave equipment state is configured to receive a heartbeat packet and a downloading instruction of the master equipment; the intranet equipment in the state of the election main equipment is configured to send an instruction of the election main equipment at regular time;
starting an intranet system, starting an election process of a main device, wherein the selected intranet device is used as a main device, and other intranet devices are slave devices;
the intranet system receives a content downloading instruction;
the master device downloads the corresponding content from the public network, and the slave device downloads the corresponding content from the master device.
As illustrated in fig. 2, a plurality of intranet devices form an intranet system, and a connection is established between the intranet system and the cloud platform. The method comprises the steps that an intranet system is in communication with a cloud platform, all devices need to communicate with the cloud platform, the cloud platform transmits a content downloading instruction to the intranet system, the intranet device downloads corresponding content according to the downloading instruction, an intranet downloading module is loaded for the intranet device in the intranet system in order to improve the efficiency and the instantaneity of downloading the content, and a shared communication protocol, such as a broadcasting protocol, is configured among the intranet devices; the intranet device may be configured to be in a slave device state, an election master device state, and a master device state; in general, one intranet device in the intranet system is used as a master device, and the other intranet devices are used as slave devices;
after the intranet system is started, the intranet equipment is started, the started intranet equipment can classify the intranet equipment through a broadcast protocol, one intranet equipment is selected as a master equipment, and other intranet equipment is selected as slave equipment; in general, a broadcast protocol of an electing master device needs to contain information such as device identification, action, etc., and once the master device is selected, a heartbeat needs to be kept between the master device and a slave device to determine whether the master device is online; once the slave device detects that the master device is offline, immediately initiating an election process for reelecting the master device;
after the intranet system receives the instruction for downloading the content, the main equipment downloads the corresponding content from the public network according to the instruction, and the slave equipment downloads the corresponding content from the main equipment through the intranet system. Generally, the cloud platform can issue a content downloading instruction to each intranet device in the intranet system, and the intranet device downloads the content according to a content downloading method of the intranet device.
In the content downloading method of the intranet equipment disclosed by some embodiments, a broadcast protocol is used for a communication protocol between the intranet equipment, the broadcast address is configured to be 255 when the last group number of the ip of the intranet equipment is changed, and the port is 12345. For example, the intranet device ip is 192.168.1.101, and the broadcast address is 192.168.1.255.
In some embodiments, the heartbeat packet sent by the master device is expressed as:
{
"id":"a5ac4356-8b04-461e-9532-19d87263c4b4",
"action":"heartbeat",
"session":14,
};
the id is the identification of the current intranet equipment, the action is the type of a heartbeat packet, the heartbeat indicates the heartbeat, the session is an equipment election value which is randomly generated when the equipment starts an election main equipment flow, and the value is a positive integer of [1, 1000 ].
In some embodiments, the content download instruction message issued by the cloud platform may be expressed as:
{
"id":"a5ac4356-8b04-461e-9532-19d87263adsfd",
"action":"download",
"name": "milk tea advertisement",
"url":"http://192.168.1.101:8888/video/1.mp4",
};
wherein, id is the intranet equipment identifier of the issuing instruction, and the equipment id of the platform is fixed as a closed-platform; the action is download, which represents the downloaded content; the name represents the name of the content to be downloaded, and url is the address of the content download. In the content downloading method of the intranet equipment disclosed in some embodiments, in the election process, a process of performing configuration of the intranet equipment in a main equipment state includes:
periodically sending heartbeat messages; the time period of the heartbeat is generally set to be 1 second, and the heartbeat period can be modified according to the requirement;
receiving a broadcast message;
if the instruction message of the competitive master device is received, modifying the master device state into the slave device state;
if heartbeat messages sent by other intranet equipment are received, comparing the session values of the other intranet equipment with the session values of the other intranet equipment:
if the session value of the self is larger than the session values of other intranet devices, the intranet devices continue to serve as the master device;
if the self session value is equal to the session value of other intranet equipment, generating new session again at random, and modifying the self as an election master equipment state;
if the session value of the self is smaller than the session values of other intranet devices, modifying the self as slave devices.
In the content downloading method of the intranet equipment disclosed by some embodiments, the period of sending the heartbeat message by the intranet equipment in the state of the main equipment is set to be 1s.
In some embodiments, after the intranet system starts to be started, the default state of the intranet device is the slave device, and after the master device is selected, the rest intranet devices are slave devices; as illustrated in fig. 3, the master device, in a subsequent job, is configured to perform the following process:
the intranet equipment serving as the main equipment continuously transmits heartbeat messages in a set period; the period is usually set to 1 second; simultaneously continuously receiving the broadcast message;
if the received broadcast message receives the message of the election master device, which indicates that other intranet equipment election master devices exist, the state of the device is modified, and the state of the slave device is modified to be the slave device state;
if the heartbeat messages of other devices are received in the received broadcast messages, the fact that two main devices exist simultaneously is indicated, and the received heartbeat messages are processed as follows: comparing other intranet devices sending heartbeat messages with the session value of the intranet devices:
if the self session value is smaller than the session values of other intranet devices, indicating that the intranet system has more excellent master devices, modifying the state of the self, namely modifying the state of the master device into the state of the slave device;
if the self session value is equal to the session value of other intranet equipment, generating new session again at random, and modifying the self as an election master equipment state; performing operation in the state of the competitive choice master equipment;
if the session value of the self is larger than the session values of other intranet devices, the self is continuously used as the main device, and the heartbeat message is continuously sent.
In the content downloading method of the intranet equipment disclosed by some embodiments, in the election process, the process of performing configuration of the intranet equipment in the slave equipment state includes:
monitoring a broadcast message, and waiting for receiving a heartbeat packet sent by a main device;
receiving a heartbeat packet sent by the main equipment, and recording the id of the main equipment and the time for receiving the heartbeat packet;
if the heartbeat packet sent by the main equipment is not received within the set time period, the state of the heartbeat packet is modified to be the state of the competitive main equipment.
In some embodiments, after the intranet system starts to start, the default state of the intranet device is a slave device, as illustrated in fig. 4, where the intranet device is configured to perform the following process, specifically including:
receiving a broadcast message, monitoring the broadcast message, waiting for a heartbeat message sent by the main equipment;
if the heartbeat packet sent by the main equipment is received, the id of the main equipment and the time for receiving the heartbeat packet are recorded;
if the heartbeat of the receiving master device is overtime, for example, no heartbeat packet is received in three periods, the intranet device adjusts the state of the intranet device and changes the state of the intranet device into the state of the competing master device. Typically, the time interval for the master device to send the heartbeat packet is 1s, and three periods are 3s.
The content downloading method of the intranet equipment disclosed by some embodiments, the process of performing intranet equipment configuration in the state of the election master equipment comprises the following steps:
receiving messages sent by other intranet equipment during the state of the election main equipment;
transmitting the competitive information according to the set time interval, and transmitting n times;
if the n-time competitive selection messages are successfully sent, modifying the state of the self to be the state of the main equipment;
if the competition message of other intranet equipment is received, comparing the session value of the competition message with the session value of the other intranet equipment:
if the session value of the self is larger than the session values of other intranet devices, the device is in the state of the election master device continuously;
if the self session value is smaller than the session values of other intranet devices, modifying the self state into the slave device state;
if the self session value is equal to the session value of other intranet equipment, regenerating a new session value, clearing the number of times of sending the competitive message, and resending the competitive message.
In the content downloading method of the intranet equipment disclosed by some embodiments, the time interval of the intranet equipment of the election main equipment for sending the election message is set to be 1s, and the sending times n is set to be 3.
In some embodiments, some intranet devices in the intranet system are in an election master state, as illustrated in fig. 5, the intranet devices in the election master state are configured to perform the following process:
the intranet system starts, and intranet equipment in the state of the election main equipment sends an election main equipment message;
during the period of the election master device, receiving broadcast messages simultaneously;
if the competition information of other intranet equipment is received, comparing the session value of the competition information with the session value of the other intranet equipment:
if the self session value is larger than the session values of other intranet devices, continuing to be in the state of the election master device;
if the self session value is smaller than the session values of other intranet devices, modifying the self state into the slave device state;
if the self session value is equal to the session value of other intranet equipment, regenerating a new session value, clearing the number of times of sending the competitive message, and resending the competitive message;
if the message of the election master device is sent for more than 3 times, the message is successful, the state of the message is modified, namely, the state of the election master device is modified to be the state of the master device; if the message of the election master device is sent for more than 3 times and is unsuccessful, the message is continuously in the state of the election master device.
In some embodiments, the election message sent by the intranet device of the election host device may be expressed as:
{ "id":"53ab20ab-4cbf-4fef-897b-124020f95b8e", "action":"voting", "session":14, };
the id is the identification of the current intranet equipment, the action is the voing and represents the election, and the session is the election value of the current equipment.
The content downloading method of the intranet equipment disclosed by some embodiments includes the steps that a process of downloading corresponding content from a public network by a main equipment includes:
receiving a content downloading instruction, and downloading corresponding content from the public network according to the address in the instruction;
generating a local download address for externally provided download content;
the method comprises the steps of sending a content downloading message outwards, wherein the content downloading address is a local downloading address generated by a main device;
and in the process of downloading the content from the public network, simultaneously providing external content downloading service until the downloading task is completed.
In some embodiments, as illustrated in fig. 6, a process of downloading content by a master device of an intranet system includes:
the intranet equipment serving as the main equipment receives a content downloading instruction issued by the platform and downloads the content according to the address; the main equipment starts the content service of the intranet system, provides content downloading service for the intranet equipment, and uses a chunk mode for content downloading; the platform transmits a content downloading instruction to the main equipment, and the main equipment downloads corresponding content from the public network according to the address in the instruction and locally stores the content;
storing the downloaded content locally and generating a local download address;
sending a local downloading instruction to intranet equipment serving as slave equipment; the method comprises the steps that a master device generates an address for providing downloaded content, and a message of the downloaded content is sent by the master device, wherein the downloaded address is a local downloaded address generated by the master device;
the master device continues to download the content until the download is completed. In general, the master device continues to download content from the public network while providing a content download service to the slave device until the content download is completed.
The content downloading method of the intranet equipment disclosed by some embodiments, a process of downloading corresponding content from the host equipment by the slave equipment comprises the following steps:
receiving a content downloading instruction message, and keeping the name of the message in the local as a task to be downloaded;
receiving a content downloading message sent by a main device, and searching a corresponding task to be downloaded from a locally stored name;
if the corresponding task to be downloaded is found, downloading the corresponding content according to the local download address sent by the main equipment, and if the corresponding task to be downloaded is not found, ignoring the content download message;
and after the content is downloaded, deleting the corresponding task to be downloaded.
In some embodiments, as illustrated in fig. 7, the process of downloading content from a master device by a slave device includes:
receiving an issued instruction;
if the download instruction is issued by the platform, the download instruction is kept, and the name of the download instruction message is kept local as a task to be downloaded;
if the download message is the download message sent by the main equipment, searching a corresponding task to be downloaded from the locally stored name; if the corresponding task to be downloaded is found, downloading the corresponding content according to the local download address sent by the main equipment until the downloading of the content is completed, and deleting the corresponding task to be downloaded after the downloading of the content is completed; if no corresponding task to be downloaded is found, the content download message is ignored.
According to the content downloading method of the intranet equipment disclosed by the embodiment of the invention, one intranet equipment is selected from a plurality of intranet equipment to serve as a master equipment, other intranet equipment serves as slave equipment, when the intranet equipment receives a downloading instruction, the master equipment downloads corresponding content from a public network according to the instruction, then forms a local downloading address, provides the downloading content for the slave equipment, and the downloading address provided by the slave equipment from the master equipment downloads the corresponding content locally; the intranet equipment only needs to integrate the intranet downloading module to automatically select the main equipment from the intranet equipment, and after the main equipment is offline, other intranet equipment can automatically select new main equipment without artificial interference, so that the operation and maintenance cost is greatly reduced; the main equipment downloads the corresponding content from the public network, and the slave equipment downloads the content from the main equipment through the intranet, so that the consumption of the public network bandwidth is greatly reduced, and the real-time performance of content delivery is also ensured. The content downloading method of the intranet equipment reduces the occupancy rate of public network resources, improves the downloading efficiency and improves the real-time performance of content downloading.
The technical solutions disclosed in the embodiments of the present invention and the technical details disclosed in the embodiments of the present invention are only exemplary to illustrate the inventive concept of the present invention, and do not constitute a limitation on the technical solutions of the embodiments of the present invention, and all conventional changes, substitutions or combinations of the technical details disclosed in the embodiments of the present invention have the same inventive concept as the present invention, and are within the scope of the claims of the present invention.

Claims (9)

1. The content downloading method of the intranet equipment is applied to an intranet system formed by the intranet equipment and is characterized by comprising the following steps:
the intranet system comprises a plurality of intranet devices, each intranet device is provided with an intranet downloading module, and the intranet devices are configured to communicate through a broadcasting protocol; the intranet equipment is configured to have a master equipment state, a slave equipment state or an competitive master equipment state; the intranet equipment in the main equipment state is configured to send heartbeat packets at fixed time and provide downloading content service for other intranet equipment; the intranet equipment in the slave equipment state is configured to receive a heartbeat packet and a downloading instruction of the master equipment; the intranet equipment in the state of the election main equipment is configured to send an instruction of the election main equipment at regular time;
starting an intranet system, starting an election process of a main device, wherein the selected intranet device is used as a main device, and other intranet devices are slave devices;
the intranet system receives a content downloading instruction;
the master device downloads the corresponding content from the public network, and the slave device downloads the corresponding content from the master device.
2. The content downloading method of an intranet device according to claim 1, wherein in the election process, the intranet device configuration in the master device state includes:
periodically sending heartbeat messages;
receiving a broadcast message;
if the instruction message of the competitive master device is received, modifying the master device state into the slave device state;
if heartbeat messages sent by other intranet equipment are received, comparing the session values of the other intranet equipment with the session values of the other intranet equipment:
if the session value of the self is larger than the session values of other intranet devices, the intranet devices continue to serve as the master device;
if the self session value is equal to the session value of other intranet equipment, generating new session again at random, and modifying the self as an election master equipment state;
if the session value of the self is smaller than the session values of other intranet devices, modifying the self as slave devices.
3. The content downloading method of an intranet device according to claim 2, wherein the period of sending the heartbeat message by the intranet device in the master device state is set to 1s.
4. The content downloading method of an intranet device according to claim 1, wherein the process of configuring the intranet device in the slave device state in the election process includes:
monitoring a broadcast message, and waiting for receiving a heartbeat packet sent by a main device;
receiving a heartbeat packet sent by the main equipment, and recording the id of the main equipment and the time for receiving the heartbeat packet;
if the heartbeat packet sent by the main equipment is not received within the set time period, the state of the heartbeat packet is modified to be the state of the competitive main equipment.
5. The content downloading method of an intranet device according to claim 4, wherein the time period for receiving the heartbeat packet sent by the host device is set to 3s.
6. The content downloading method of an intranet device according to claim 1, wherein the process performed by the intranet device configuration in the state of the election master device includes:
receiving messages sent by other intranet equipment during the state of the election main equipment;
transmitting the competitive information according to the set time interval, and transmitting n times;
if the n-time competitive selection messages are successfully sent, modifying the state of the self to be the state of the main equipment; if the n-time competitive choice message is sent unsuccessfully, continuing to be in the competitive choice main equipment state;
if the competition message of other intranet equipment is received, comparing the session value of the competition message with the session value of the other intranet equipment:
if the session value of the self is larger than the session values of other intranet devices, the device is in the state of the election master device continuously;
if the self session value is smaller than the session values of other intranet devices, modifying the self state into the slave device state;
if the self session value is equal to the session value of other intranet equipment, regenerating a new session value, clearing the number of times of sending the competitive message, and resending the competitive message.
7. The content downloading method as claimed in claim 6, wherein the time interval for the intranet device of the election master device to transmit the election message is set to 1s, and the number of transmissions n is set to 3.
8. The content downloading method of an intranet device according to claim 1, wherein the process of downloading the corresponding content from the public network by the host device includes:
receiving a content downloading instruction, and downloading corresponding content from the public network according to the address in the instruction;
generating a local download address for externally provided download content;
the method comprises the steps of sending a content downloading message outwards, wherein the content downloading address is a local downloading address generated by a main device;
and in the process of downloading the content from the public network, simultaneously providing external content downloading service until the downloading task is completed.
9. The content downloading method of an intranet device according to claim 1, wherein the process of downloading the corresponding content from the host device by the slave device includes:
receiving a content downloading instruction message, and keeping the name of the message in the local as a task to be downloaded;
receiving a content downloading message sent by a main device, and searching a corresponding task to be downloaded from a locally stored name;
if the corresponding task to be downloaded is found, downloading the corresponding content according to the local download address sent by the main equipment, and if the corresponding task to be downloaded is not found, ignoring the content download message;
and after the content is downloaded, deleting the corresponding task to be downloaded.
CN202310945591.9A 2023-07-31 2023-07-31 Content downloading method of intranet equipment Pending CN116684406A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310945591.9A CN116684406A (en) 2023-07-31 2023-07-31 Content downloading method of intranet equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310945591.9A CN116684406A (en) 2023-07-31 2023-07-31 Content downloading method of intranet equipment

Publications (1)

Publication Number Publication Date
CN116684406A true CN116684406A (en) 2023-09-01

Family

ID=87787653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310945591.9A Pending CN116684406A (en) 2023-07-31 2023-07-31 Content downloading method of intranet equipment

Country Status (1)

Country Link
CN (1) CN116684406A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117440031A (en) * 2023-12-15 2024-01-23 广东朝歌智慧互联科技有限公司 Method for cloud platform to issue instruction to intranet equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6363416B1 (en) * 1998-08-28 2002-03-26 3Com Corporation System and method for automatic election of a representative node within a communications network with built-in redundancy
CN106817250A (en) * 2016-12-23 2017-06-09 东软集团股份有限公司 A kind of dynamic electoral machinery and system
CN115002098A (en) * 2022-05-13 2022-09-02 聚投科技(珠海)有限公司 File publishing method based on local area network autonomous discovery and election, computer device and computer readable storage medium
CN116506672A (en) * 2023-06-29 2023-07-28 北京朝歌数码科技股份有限公司 Audio and video synchronous playing method of intranet equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6363416B1 (en) * 1998-08-28 2002-03-26 3Com Corporation System and method for automatic election of a representative node within a communications network with built-in redundancy
CN106817250A (en) * 2016-12-23 2017-06-09 东软集团股份有限公司 A kind of dynamic electoral machinery and system
CN115002098A (en) * 2022-05-13 2022-09-02 聚投科技(珠海)有限公司 File publishing method based on local area network autonomous discovery and election, computer device and computer readable storage medium
CN116506672A (en) * 2023-06-29 2023-07-28 北京朝歌数码科技股份有限公司 Audio and video synchronous playing method of intranet equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117440031A (en) * 2023-12-15 2024-01-23 广东朝歌智慧互联科技有限公司 Method for cloud platform to issue instruction to intranet equipment
CN117440031B (en) * 2023-12-15 2024-04-12 广东朝歌智慧互联科技有限公司 Method for cloud platform to issue instruction to intranet equipment

Similar Documents

Publication Publication Date Title
CN109831506A (en) File uploading method, device, terminal, server and readable storage medium storing program for executing
US8842697B2 (en) Method and device for allocating MAC addresses in a carrier-current communication network
US11012356B2 (en) Method of forwarding a received message in a mesh network comprising a plurality of communicatively interconnected mesh nodes as well as a corresponding mesh node
CN111427527B (en) Screen projection method, device, equipment and computer readable storage medium
CN101730090B (en) Method and equipment for releasing IP addresses by DHCP server
CN116684406A (en) Content downloading method of intranet equipment
CN101015170A (en) Pinging for the presence of a server in a peer to peer monitoring system
CN101227433A (en) Terminal and method for implementing information sharing in network television business system
CN102314408B (en) Method, device, equipment and system for acquiring configuration information and configuring
CN109962760B (en) Service scheduling method suitable for wireless TDMA ad hoc network
CN107872396B (en) Communication method with timeout control, processing device, terminal device and server
CN109286854B (en) WiFi network-based network streaming media jam detection and optimization system and method
US20100017523A1 (en) Communication control apparatus and communication control method
CN106851799B (en) Method and device for sending heartbeat packet in long connection
CN102111426A (en) Method, system and device for implementing point-to-point technology
CN101136870A (en) Symbol based message transferring method and system
CN101494768A (en) Method and apparatus for sending and downloading multimedia data, and multimedia order programme system
CN104009961A (en) PPPoE session ID distribution method and equipment thereof
US20120307661A1 (en) Usable bandwidth measurement method, usable bandwidth measurement system, terminal device, and computer-readable recording medium
CN100370727C (en) Method and system for transmitting and processing advertisement in internetwork
CN101695049A (en) Method and device for processing businesses in monitoring system
CN101632261B (en) Full mesh rates transaction in a network
JP2004080566A (en) Contents distribution method and contents distribution system using the same
CN102523485B (en) Information distribution method and system
CN112925946B (en) Service data storage method and device and electronic equipment

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