CN111010389A - Code stream adjusting method and device, storage medium and electronic device - Google Patents
Code stream adjusting method and device, storage medium and electronic device Download PDFInfo
- Publication number
- CN111010389A CN111010389A CN201911269901.XA CN201911269901A CN111010389A CN 111010389 A CN111010389 A CN 111010389A CN 201911269901 A CN201911269901 A CN 201911269901A CN 111010389 A CN111010389 A CN 111010389A
- Authority
- CN
- China
- Prior art keywords
- code stream
- ipc
- equipment
- ipc equipment
- relay
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/75—Media network packet handling
- H04L65/765—Media network packet handling intermediate
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0009—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the channel coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/22—Traffic shaping
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Quality & Reliability (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a code stream adjusting method and device, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring an input code stream to be sent by relay IPC equipment in a cascade system and an output code stream allowed to be sent by the relay IPC equipment; according to the size relation between the input code stream and the output code stream, the code streams of the relay IPC equipment and the IPC equipment at the lower level of the relay IPC equipment are adjusted, so that the adjusted input code stream is matched with the output code stream.
Description
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for adjusting a code stream, a storage medium, and an electronic apparatus.
Background
In the related art, for example, the application number CN107786560A "streaming media adaptive transmission method, terminal and system" has a design point that, for a single device, a prediction is fed back to a sending end according to a network bandwidth of a streaming media receiving end, and the sending end adjusts a code according to the fed-back bandwidth to adapt to a current network condition.
The main design point of other common existing designs is to control the coding state according to the buffer state, delay and other factors of the sending end as judgment conditions, and the main objective of the technical scheme focuses on a single device and the judgment conditions for coding adjustment of the single device, and basically does not consider that in a large network environment, if strategic coding adjustment is performed on a plurality of devices, the flow in the whole network uses the whole network environment.
Aiming at the problems that code stream adjustment and the like of a plurality of IPC devices are not considered in the related technology, an effective technical scheme is not provided.
Disclosure of Invention
The embodiment of the invention provides a code stream adjusting method and device, a storage medium and an electronic device, which are used for at least solving the problems that code stream adjustment on a plurality of IPC (inter process control) equipment is not considered in the related technology and the like.
The embodiment of the invention provides a code stream adjusting method, which comprises the following steps: acquiring an input code stream to be sent of a relay network CAMERA (IP CAMERA, IPC for short) device in a cascade system and an output code stream allowed to be sent by the relay IPC device; and adjusting the code streams of the relay IPC equipment and the lower IPC equipment of the relay IPC equipment according to the size relation between the input code stream and the output code stream so as to match the adjusted input code stream with the output code stream.
In the embodiment of the present invention, adjusting the code stream of the relay IPC device and the IPC device at the lower level of the relay IPC device according to the size relationship between the input code stream and the output code stream includes: under the condition that the size relation indicates that the input code stream is larger than the output code stream, detecting whether the code stream configuration of the relay IPC equipment and all lower-level IPC equipment reaches the minimum value of the adjustable range of the code stream; if not, acquiring the priority information of the relay IPC equipment and all lower-level IPC equipment; and based on the priority information, sequentially reducing the code stream of the lower IPC equipment in the order of the priority from low to high so as to match the adjusted input code stream with the output code stream.
In the embodiment of the present invention, adjusting the code stream of the relay IPC device and the IPC device at the lower level of the relay IPC device according to the size relationship between the input code stream and the output code stream includes: under the condition that the size relation indicates that the input code stream is less than or equal to the output code stream, detecting whether the code stream configuration of the relay IPC equipment and all lower-level IPC equipment reaches the maximum value of the adjustable range of the code stream; if not, acquiring the priority information of the relay IPC equipment and all lower-level IPC equipment; and based on the priority information, sequentially up-regulating the code stream of the lower IPC equipment according to the sequence of the priority from high to low so as to match the regulated input code stream with the output code stream.
In the embodiment of the present invention, before the code stream of the lower IPC device is sequentially adjusted from high priority to low priority so that the adjusted input code stream is matched with the output code stream, the method further includes: and determining whether a down-regulation object of the code stream of the lower IPC equipment is the relay IPC equipment, and if so, sequentially up-regulating the code stream of the lower IPC equipment according to the sequence of the priority from high to low so as to match the regulated input code stream with the output code stream.
In the embodiment of the present invention, before or after obtaining an input code stream to be sent by a relay IPC device and an output code stream allowed to be sent by the relay IPC device in a cascade system, the method further includes: receiving at least one of the following information uploaded by the lower IPC equipment of the relay IPC equipment: the device identification is used for uniquely identifying the IPC device, the code stream configuration is used for indicating the actual code stream size of the current IPC device, the code stream adjustable range is used for indicating the upper limit and the lower limit of the code stream allowed to be adjusted by the current IPC device, the priority information is used for indicating the priority of the current IPC device, the corresponding link is used for indicating the link of the current IPC device, and the down-regulation regulator is used for indicating the IPC device commanding the current IPC device to down-regulate the code stream.
According to another embodiment of the present invention, there is also provided a code stream adjusting apparatus, including: the device comprises an acquisition module, a judgment module and a control module, wherein the acquisition module is used for acquiring an input code stream to be sent by relay IPC equipment in a cascade system and an output code stream allowed to be sent by the relay IPC equipment; and the adjusting module is used for adjusting the code streams of the relay IPC equipment and the lower IPC equipment of the relay IPC equipment according to the size relation between the input code stream and the output code stream so as to match the adjusted input code stream with the output code stream. In the embodiment of the invention, the adjusting module is further used for detecting whether the code stream configuration of all lower IPC equipment of the relay IPC equipment reaches the minimum value of the adjustable range of the code stream under the condition that the size relation indicates that the input code stream is larger than the output code stream; if not, acquiring the priority information of the relay IPC equipment and all lower-level IPC equipment; and based on the priority information, sequentially reducing the code stream of the lower IPC equipment in the order of the priority from low to high so as to match the adjusted input code stream with the output code stream.
In the embodiment of the present invention, the adjusting module is further configured to detect whether code stream configurations of all subordinate IPC devices of the relay IPC device reach a maximum value of an adjustable range of the code stream, under a condition that the size relationship indicates that the input code stream is less than or equal to the output code stream; if not, acquiring the priority information of the relay IPC equipment and all lower-level IPC equipment; and based on the priority information, sequentially up-regulating the code stream of the lower IPC equipment according to the sequence of the priority from high to low so as to match the regulated input code stream with the output code stream.
In an embodiment of the present invention, the apparatus further includes: and the determining module is used for determining whether a command sender for down-regulating the code stream of the lower IPC equipment is the relay IPC equipment, and if so, sequentially up-regulating the code stream of the lower IPC equipment according to the sequence of the priority from high to low so as to match the regulated input code stream with the regulated output code stream.
In an embodiment of the present invention, the apparatus further includes: the receiving module is used for receiving at least one of the following information uploaded by the lower IPC equipment of the relay IPC equipment: the device identification is used for uniquely identifying the IPC device, the code stream configuration is used for indicating the actual code stream size of the current IPC device, the code stream adjustable range is used for indicating the upper limit and the lower limit of the code stream allowed to be adjusted by the current IPC device, the priority information is used for indicating the priority of the current IPC device, the corresponding link is used for indicating the link of the current IPC device, and the down-regulation regulator is used for indicating the IPC device commanding the current IPC device to down-regulate the code stream.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the input code stream to be sent of the relay IPC equipment in the cascade system and the output code stream allowed to be sent by the relay IPC equipment are obtained; according to the size relation between the input code stream and the output code stream, the code streams of the relay IPC equipment and the IPC equipment at the lower level of the relay IPC equipment are adjusted, so that the adjusted input code stream is matched with the output code stream.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a computer terminal of a code stream adjusting method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a code stream adjusting method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a typical networking topology in the related art;
FIG. 4 is a flow diagram of a non-terminal IPC in an operational state according to an embodiment of the present invention;
fig. 5 is a block diagram of a code stream adjusting apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method provided by the embodiment of the application can be executed in a computer terminal or a similar operation device. Taking the example of running on a computer terminal, fig. 1 is a hardware structure block diagram of a computer terminal of a code stream adjusting method according to an embodiment of the present invention. As shown in fig. 1, the computer terminal 10 may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to the code stream adjusting method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the above method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
According to an embodiment of the present invention, a code stream adjusting method is provided, and fig. 2 is a flowchart of the code stream adjusting method according to the embodiment of the present invention, as shown in fig. 2, including:
step S202, acquiring an input code stream to be sent by relay IPC equipment in a cascade system and an output code stream allowed to be sent by the relay IPC equipment;
and S204, adjusting the code streams of the relay IPC equipment and the lower IPC equipment of the relay IPC equipment according to the size relation of the input code stream and the output code stream so as to match the adjusted input code stream with the output code stream.
By the technical scheme, an input code stream to be sent of the relay IPC equipment in the cascade system and an output code stream allowed to be sent by the relay IPC equipment are obtained; according to the size relation between the input code stream and the output code stream, the code streams of the relay IPC equipment and the IPC equipment at the lower level of the relay IPC equipment are adjusted, so that the adjusted input code stream is matched with the output code stream.
In the embodiment of the present invention, adjusting the code stream of the relay IPC device and the IPC device at the lower level of the relay IPC device according to the size relationship between the input code stream and the output code stream includes: under the condition that the size relation indicates that the input code stream is larger than the output code stream, detecting whether the code stream configuration of the target relay IPC equipment and all lower-level IPC equipment reaches the minimum value of the adjustable range of the code stream; if not, acquiring the priority information of the relay IPC equipment and all lower-level IPC equipment; and based on the priority information, sequentially reducing the code stream of the lower IPC equipment in the order of the priority from low to high so as to match the adjusted input code stream with the output code stream.
By knowing the size relationship between the input code stream and the output code stream of the relay IPC equipment, when the input code stream is larger than the output code stream, whether the code stream configuration of the target relay IPC equipment and all lower-level IPC equipment is adjusted to the minimum value of the adjustable range is detected, and when the code stream configuration of the lower-level IPC equipment does not reach the minimum value of the adjustable range, the code stream configuration of the lower-level IPC equipment is adjusted downwards according to the priority information in the target relay IPC equipment from low to high so that the output code stream is matched with the input code stream in size. When the code stream configuration of the lower IPC equipment reaches the minimum value of the adjustable range, the input code stream to be sent of the relay IPC equipment in the cascade system and the output code stream allowed to be sent of the relay IPC equipment are obtained again and compared, if the input code stream is larger than the output code stream, the step S202 and the step S204 are executed circularly, and the circulation is stopped until the adjusted input code stream is matched with the output code stream.
By the embodiment, when the input code stream is larger than the output code stream in the target relay IPC equipment, the code stream configuration of the relay IPC equipment and all lower-level IPC equipment is sequentially adjusted downwards according to the priority order, so that the overall coding of the equipment in the whole network adapts to the network change, and the transmission quality of the priority equipment is ensured.
In the embodiment of the present invention, adjusting the code streams of the relay IPC device and the IPC device at the lower level of the relay IPC device according to the size relationship between the input code stream and the output code stream includes: under the condition that the size relation indicates that the input code stream is less than or equal to the output code stream, detecting whether the code stream configuration of the relay IPC equipment and all lower IPC equipment reaches the maximum value of the code stream adjustable range; if not, acquiring the priority information of the relay IPC equipment and all lower-level IPC equipment; and sequentially up-regulating the code stream of the lower-level IPC equipment according to the priority from high to low based on the priority information so as to match the regulated input code stream with the output code stream. By knowing the size relationship between the input code stream and the output code stream of the relay IPC equipment, when the input code stream is smaller than or equal to the output code stream, whether the code stream configuration of the target relay IPC equipment and all lower-level IPC equipment is adjusted to the maximum value of the adjustable range is detected, and the code stream configuration of the lower-level IPC equipment is adjusted up from high to low according to the priority information in the target relay IPC equipment, so that the output code stream is matched with the size of the input code stream.
By the embodiment, when the input code stream is less than or equal to the output code stream in the target relay IPC equipment, the code stream configuration of the relay IPC equipment and all lower-level IPC equipment is sequentially adjusted according to the priority order, so that the whole code of the equipment in the whole network adapts to network change, and the transmission quality of the priority equipment is ensured.
In the embodiment of the present invention, before the code stream of the lower IPC device is sequentially adjusted up according to the order of priority from high to low so that the adjusted input code stream is matched with the output code stream, the method further includes: and determining whether a down-regulation object for down-regulating the code stream of the lower-level IPC equipment is the relay IPC equipment, and if so, sequentially up-regulating the code stream of the lower-level IPC equipment according to the sequence of the priority from high to low so as to match the regulated input code stream with the output code stream. The code stream of the lower IPC equipment is sequentially adjusted up according to the priority from high to low, namely before the code stream of the lower IPC equipment is adjusted up, whether the relay IPC equipment which needs the code stream of the lower IPC equipment to be adjusted up currently and the relay IPC equipment which enables the code stream of the lower IPC equipment to be adjusted down previously are the same or not needs to be confirmed, if yes, the code stream configuration of the lower IPC equipment is adjusted from high to low according to the priority, and the output code stream is matched with the input code stream in size.
In the embodiment of the present invention, before or after obtaining an input code stream to be sent by a relay IPC device and an output code stream allowed to be sent by the relay IPC device in a cascade system, the method further includes: receiving at least one of the following information uploaded by the lower IPC equipment of the relay IPC equipment: the device identification is used for uniquely identifying the IPC device, the code stream configuration is used for indicating the actual code stream size of the current IPC device, the code stream adjustable range is used for indicating the upper limit and the lower limit of the code stream allowed to be adjusted by the current IPC device, the priority information is used for indicating the priority of the current IPC device, the corresponding link is used for indicating the link of the current IPC device, and the down-regulation regulator is used for indicating the IPC device commanding the current IPC device to down-regulate the code stream.
By the embodiment, when the input code stream to be sent of the relay IPC equipment in the cascade system and the output code stream allowed to be sent by the relay IPC equipment are obtained, equipment identification information used by lower-level IPC equipment for identifying the IPC equipment, the code stream configuration size allowed to be adjusted by the IPC equipment, priority information of the IPC equipment, corresponding link information indicating a current IPC equipment link, and indication information sent by a down-regulation regulator for down-regulating the code stream of the IPC equipment can be received. According to the acquired information, the accuracy of IPC equipment code stream configuration is ensured, and the whole code of the equipment in the whole network adapts to the network change condition.
The flow of the code stream adjusting method is explained with reference to an example, but the flow is not limited to the technical solution of the embodiment of the present invention. In order to better understand the technical solutions of the embodiments and the alternative embodiments of the present invention, the following description is made on possible meanings of the terms in the embodiments and the alternative embodiments of the present invention, but is not intended to limit the meanings of the following terms:
terminal IPC (equivalent to lower IPC): the front end IPC in the network topology, no other IPC relays to the IPC;
non-terminal IPC (equivalent to relay IPC): the IPC of the nodes in the network topology has other IPCs relayed to the IPC;
code stream configuration: the actual code stream size of the current IPC;
the code stream can be adjusted in range: the current IPC allows the lower limit and the upper limit of the code stream to be adjusted;
priority: the IPC importance degree of user configuration is reflected;
and a corresponding link: the IPC is obtained through which link, and the IPC passes through a unique link of the IP addresses and the port identifiers of the home terminal and the opposite terminal;
the down regulation regulator is: if some IPC code stream is adjusted downwards, who is the trigger.
Based on the above concept, the present invention provides a code stream adjusting method, so as to ensure the transmission quality of a high-priority device, and the overall coding of the device in the entire network adapts to the network change. As shown in fig. 3, in this cascade system, a front-end device IPC2/IPC3 is connected to a back-end storage device by IPC1 as a relay, and IPC4/IPC5 is connected to a storage device by relaying to IPC3 and then to IPC 1. In an actual use environment, because different front-end devices are deployed at different positions, the requirements of users on the image quality and the clamping condition of different devices are different, and the importance of different front-end devices is also different. The method provided by the embodiment of the invention mainly aims to preferentially ensure the transmission quality of the high-priority equipment in the scene.
For non-terminal front-end devices in the system (having relay links of other front-end devices, which is equivalent to the relay IPC device in the embodiment of the present invention), the following method is used to ensure the quality and fluency of the high-priority devices (the topology of fig. 3 is taken as an example for the present embodiment). In this system, it is assumed that the importance of the user to the device is: IPC3> IPC5>1PC2 ═ 1PC1> IPC 4.
Initial state: each front end IPC sends its own coding configuration information, coding adjustable range, equipment priority and link information to upstream nodes, and each passing non-terminal IPC equipment records the equipment information and continues reporting until reaching the storage equipment. The IPC1 in fig. 3 forms the device information table as follows:
IPC3 forms device information as follows:
the non-terminal IPC process in the operating state is shown in fig. 4, and includes the following steps:
step 1: each IPC counts the sum of code streams inBit (which can be understood as the sum of data to be transmitted by the relay IPC equipment and data to be transmitted by the lower-level IPC equipment of the relay IPC equipment) relayed to all front-end equipment of the IPC equipment (including the IPC equipment), counts the sum of code streams outBit (which is equivalent to the capacity of the relay IPC equipment which has the capacity of being capable of transmitting data) output, if inBit is greater than outBit, step 7 is executed, otherwise, step 2 is executed;
step 2: if the network sending capacity is higher than or equal to the sum of the code streams of the current equipment, executing code stream up-regulation, and executing the step 3;
and step 3: if the current code stream configuration sum of all the child nodes is the sum of the maximum value of the adjustable range (the current is the upper limit capable of being adjusted), the up-adjustment is abandoned, the step 1 is continuously executed, and if the space can be adjusted, the step 4 is executed;
and 4, step 4: checking an own equipment information table, wherein the own equipment information table and the lower node are not the maximum value absolutely, collecting the equipment (whether the code stream is adjusted by the IPC of the relay or not, and possibly other relays send out an over-and-down instruction) of which the down-regulation adjuster is the own equipment, if not, executing the step 1, otherwise, executing the step 5;
and 5: in the device list with the down-regulation regulator as the self, the priority is from high to low, whether the current configuration of the device is the highest configuration of the code stream or not is checked in sequence, if not, the IPC coding configuration is up-regulated to the highest value of the adjustable range of the code stream;
step 6: when adjusting the code stream, determining which link to send a down-regulation command, finding the link of the corresponding link to search the target IPC, issuing code stream adjustment information, and deleting the adjuster information of the IPC of a down-regulation adjuster;
and 7: if the network sending capability is lower than the sum of the code streams of the current equipment, executing code stream down regulation, and executing the step 8;
and 8: if the current sum of all the child node code stream configurations is the sum of the minimum value of the adjustable range (the current sum is the lower limit capable of being adjusted downwards), giving up the adjustment downwards, and continuing to execute the step 1, otherwise, executing the step 9;
and step 9: checking an own equipment information table, sequentially checking whether the current configuration of the equipment is the lowest configuration of the code stream from low to high in priority, if not, gradually reducing IPC (inter-process control) coding configuration to the lowest value one by one according to the total amount of the code stream required to be reduced, wherein the reduced total amount is from inBit to outBit;
step 10: and searching an IPC link needing to be adjusted downwards, issuing code stream adjustment information and adjuster information, and recording the IPC adjustment person to be adjusted downwards as the IPC adjustment person.
It should be noted that, the steps 1 to 10 are not used to limit the execution steps of the alternative embodiment of the present invention, and the order of the steps may be changed if necessary, which is not limited by the embodiment of the present invention.
In addition, all IPC equipment in the cascade system receives the code stream adjustment request, if the IPC equipment needs to perform code stream adjustment by itself, the IPC equipment performs code stream adjustment, refreshes an information table of the IPC equipment, and reports the code stream configuration, the adjustable range and the priority of the IPC equipment upwards step by step; if the self-execution is not needed, searching a self-equipment information table and informing the self-equipment information table through a corresponding link; the non-terminal IPC receives the report information, refreshes an equipment information table of the non-terminal IPC and reports the report information until the non-terminal IPC stores the information; in the whole network, each node counts the input and the output of the node, and if the input is greater than the output, the node with the lowest priority is found out to be lowered; when the lifting platform rises, only the lifting platform can find out the descending of the lifting platform at the moment, and if the lifting platform does not descend, the lifting platform cannot lift.
Through the embodiment, in the cascade system, the whole cascade full-network linkage is carried out according to the important level of IPC, the IPC code stream with low priority is preferentially reduced, and the transmission quality of high-priority equipment in the whole cascade system is ensured.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The present embodiment further provides a code stream adjusting apparatus, which is used to implement the foregoing embodiments and preferred embodiments, and the description of the apparatus is omitted here. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of a code stream adjusting apparatus according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes:
(1) an obtaining module 52, configured to obtain an input code stream to be sent by a relay IPC device in a cascade system and an output code stream allowed to be sent by the relay IPC device;
(3) and the adjusting module 54 is configured to adjust the code streams of the relay IPC device and the IPC devices in lower levels of the relay IPC device according to the size relationship between the input code stream and the output code stream, so that the adjusted input code stream is matched with the output code stream.
By the technical scheme, an input code stream to be sent of the relay IPC equipment in the cascade system and an output code stream allowed to be sent by the relay IPC equipment are obtained; according to the size relation between the input code stream and the output code stream, the code streams of the relay IPC equipment and the IPC equipment at the lower level of the relay IPC equipment are adjusted, so that the adjusted input code stream is matched with the output code stream.
In the embodiment of the present invention, the adjusting module 54 is further configured to detect whether the code stream configurations of all lower IPC devices of the relay IPC device reach the maximum value of the adjustable range of the code stream under the condition that the size relationship indicates that the input code stream is less than or equal to the output code stream; if not, acquiring the priority information of the relay IPC equipment and all lower-level IPC equipment; and based on the priority information, sequentially up-regulating the code stream of the lower IPC equipment according to the sequence of the priority from high to low so as to match the regulated input code stream with the output code stream.
By knowing the size relationship between the input code stream and the output code stream of the relay IPC equipment, when the input code stream is larger than the output code stream, whether the code stream configuration of the target relay IPC equipment and all lower-level IPC equipment is adjusted to the minimum value of the adjustable range is detected, and when the code stream configuration of the lower-level IPC equipment does not reach the minimum value of the adjustable range, the code stream configuration of the lower-level IPC equipment is adjusted downwards according to the priority information in the target relay IPC equipment from low to high so that the output code stream is matched with the input code stream in size. When the code stream configuration of the lower IPC equipment reaches the minimum value of the adjustable range, the input code stream to be sent of the relay IPC equipment in the cascade system and the output code stream allowed to be sent of the relay IPC equipment are obtained again and compared, if the input code stream is larger than the output code stream, the step S202 and the step S204 are executed circularly, and the circulation is stopped until the adjusted input code stream is matched with the output code stream.
By the embodiment, when the input code stream is larger than the output code stream in the target relay IPC equipment, the code stream configuration of the relay IPC equipment and all lower-level IPC equipment is sequentially adjusted downwards according to the priority order, so that the overall coding of the equipment in the whole network adapts to the network change, and the transmission quality of the priority equipment is ensured.
In an embodiment of the present invention, the apparatus further includes: and the determining module is used for determining whether a command sender for down-regulating the code stream of the lower IPC equipment is the relay IPC equipment, and if so, sequentially up-regulating the code stream of the lower IPC equipment according to the sequence of the priority from high to low so as to match the regulated input code stream with the regulated output code stream. By knowing the size relationship between the input code stream and the output code stream of the relay IPC equipment, when the input code stream is smaller than or equal to the output code stream, whether the code stream configuration of the target relay IPC equipment and all lower-level IPC equipment is adjusted to the maximum value of the adjustable range is detected, and the code stream configuration of the lower-level IPC equipment is adjusted up from high to low according to the priority information in the target relay IPC equipment, so that the output code stream is matched with the size of the input code stream.
By the embodiment, when the input code stream is less than or equal to the output code stream in the target relay IPC equipment, the code stream configuration of the relay IPC equipment and all lower-level IPC equipment is sequentially adjusted according to the priority order, so that the whole code of the equipment in the whole network adapts to network change, and the transmission quality of the priority equipment is ensured.
In this embodiment of the present invention, the obtaining module 52 is further configured to determine whether a down-regulation object that down-regulates the code stream of the lower IPC device is the relay IPC device, and if so, sequentially up-regulates the code stream of the lower IPC device according to a sequence from a high priority to a low priority, so that the regulated input code stream is matched with the output code stream. The code stream of the lower IPC equipment is sequentially adjusted up according to the priority from high to low, namely before the code stream of the lower IPC equipment is adjusted up, whether the relay IPC equipment which needs the code stream of the lower IPC equipment to be adjusted up currently and the relay IPC equipment which enables the code stream of the lower IPC equipment to be adjusted down previously are the same or not needs to be confirmed, if yes, the code stream configuration of the lower IPC equipment is adjusted from high to low according to the priority, and the output code stream is matched with the input code stream in size.
In an embodiment of the present invention, the apparatus further includes: the receiving module is used for receiving at least one of the following information uploaded by the lower IPC equipment of the relay IPC equipment: the device identification is used for uniquely identifying the IPC device, the code stream configuration is used for indicating the actual code stream size of the current IPC device, the code stream adjustable range is used for indicating the upper limit and the lower limit of the code stream allowed to be adjusted by the current IPC device, the priority information is used for indicating the priority of the current IPC device, the corresponding link is used for indicating the link of the current IPC device, and the down-regulation regulator is used for indicating the IPC device commanding the current IPC device to down-regulate the code stream.
By the embodiment, when the input code stream to be sent of the relay IPC equipment in the cascade system and the output code stream allowed to be sent by the relay IPC equipment are obtained, equipment identification information used by lower-level IPC equipment for identifying the IPC equipment, the code stream configuration size allowed to be adjusted by the IPC equipment, priority information of the IPC equipment, corresponding link information indicating a current IPC equipment link, and indication information sent by a down-regulation regulator for down-regulating the code stream of the IPC equipment can be received. According to the obtained information, the accuracy of IPC equipment code stream configuration is ensured, and the whole code of the equipment in the whole network adapts to the network change condition
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring an input code stream to be sent by the relay IPC equipment in the cascade system and an output code stream allowed to be sent by the relay IPC equipment;
and S2, adjusting the code streams of the relay IPC equipment and the lower IPC equipment of the relay IPC equipment according to the size relationship between the input code stream and the output code stream so as to match the adjusted input code stream with the output code stream.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring an input code stream to be sent by the relay IPC equipment in the cascade system and an output code stream allowed to be sent by the relay IPC equipment;
and S2, adjusting the code streams of the relay IPC equipment and the lower IPC equipment of the relay IPC equipment according to the size relationship between the input code stream and the output code stream so as to match the adjusted input code stream with the output code stream.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.
Claims (11)
1. A code stream adjusting method is characterized by comprising the following steps:
acquiring an input code stream to be sent by relay IPC equipment in a cascade system and an output code stream allowed to be sent by the relay IPC equipment;
and adjusting the code streams of the relay IPC equipment and the lower IPC equipment of the relay IPC equipment according to the size relation between the input code stream and the output code stream so as to match the adjusted input code stream with the output code stream.
2. The method of claim 1, wherein adjusting the code streams of the relay IPC device and the IPC device at the lower level of the relay IPC device according to the size relationship between the input code stream and the output code stream comprises:
under the condition that the size relation indicates that the input code stream is larger than the output code stream, detecting whether the code stream configuration of the relay IPC equipment and all lower-level IPC equipment reaches the minimum value of the code stream adjustable range;
if not, acquiring the priority information of the relay IPC equipment and all lower-level IPC equipment;
and based on the priority information, sequentially reducing the code stream of the lower IPC equipment according to the sequence of the priority from low to high so as to match the adjusted input code stream with the output code stream.
3. The method of claim 1, wherein adjusting the code streams of the relay IPC device and the IPC device at the lower level of the relay IPC device according to the size relationship between the input code stream and the output code stream comprises:
under the condition that the size relation indicates that the input code stream is smaller than or equal to the output code stream, detecting whether the code stream configuration of the relay IPC equipment and all lower IPC equipment reaches the maximum value of an adjustable range of the code stream;
if not, acquiring the priority information of the relay IPC equipment and all lower-level IPC equipment;
and sequentially up-regulating the code stream of the lower-level IPC equipment according to the priority from high to low based on the priority information so as to match the regulated input code stream with the output code stream.
4. The method as claimed in claim 3, wherein before the code stream of the lower IPC device is sequentially up-regulated in order of priority from high to low so that the regulated input code stream matches the output code stream, the method further comprises:
and determining whether a down-regulation object for down-regulating the code stream of the lower-level IPC equipment is the relay IPC equipment, and if so, sequentially up-regulating the code stream of the lower-level IPC equipment according to the sequence of the priority from high to low so as to match the regulated input code stream with the output code stream.
5. The method of claim 1, wherein before or after obtaining an input code stream to be sent by a relay IPC device in a cascade system and an output code stream allowed to be sent by the relay IPC device, the method further comprises:
receiving at least one of the following information uploaded by the lower IPC equipment of the relay IPC equipment: the IPC equipment comprises an equipment identifier, a code stream configuration, a code stream adjustable range, priority information, a corresponding link and a down-regulation adjusting object, wherein the equipment identifier is used for uniquely identifying the IPC equipment, the code stream configuration is used for indicating the actual code stream size of the current IPC equipment, the code stream adjustable range is used for indicating the upper limit and the lower limit of the code stream allowed to be adjusted by the current IPC equipment, the priority information is used for indicating the priority of the current IPC equipment, the corresponding link is used for indicating the link of the current IPC equipment, and the down-regulation adjuster is used for indicating the IPC equipment which orders the current IPC equipment to down.
6. A code stream adjusting apparatus, comprising:
the device comprises an acquisition module, a judgment module and a control module, wherein the acquisition module is used for acquiring an input code stream to be sent by relay IPC equipment in a cascade system and an output code stream allowed to be sent by the relay IPC equipment;
and the adjusting module is used for adjusting the code streams of the relay IPC equipment and the lower IPC equipment of the relay IPC equipment according to the size relation between the input code stream and the output code stream so as to match the adjusted input code stream with the output code stream.
7. The apparatus of claim 6, wherein the adjusting module is further configured to detect whether code stream configurations of all lower IPC devices of the relay IPC device reach a minimum value of a code stream adjustable range under the condition that the size relationship indicates that the input code stream is greater than the output code stream; if not, acquiring the priority information of the relay IPC equipment and all lower-level IPC equipment; and based on the priority information, sequentially reducing the code stream of the lower IPC equipment according to the sequence of the priority from low to high so as to match the adjusted input code stream with the output code stream.
8. The apparatus according to claim 6, wherein the adjusting module is further configured to detect whether code stream configurations of all lower IPC devices of the relay IPC device reach a maximum value of a code stream adjustable range, in a case that the size relationship indicates that the input code stream is less than or equal to the output code stream; if not, acquiring the priority information of the relay IPC equipment and all lower-level IPC equipment; and sequentially up-regulating the code stream of the lower-level IPC equipment according to the priority from high to low based on the priority information so as to match the regulated input code stream with the output code stream.
9. The apparatus of claim 8, further comprising: and the determining module is also used for determining whether a command sender for down-regulating the code stream of the lower IPC equipment is the relay IPC equipment, and if so, sequentially up-regulating the code stream of the lower IPC equipment according to the sequence of the priority from high to low so as to match the regulated input code stream with the output code stream.
10. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 5 when executed.
11. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911269901.XA CN111010389B (en) | 2019-12-11 | 2019-12-11 | Code stream adjusting method and device, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911269901.XA CN111010389B (en) | 2019-12-11 | 2019-12-11 | Code stream adjusting method and device, storage medium and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111010389A true CN111010389A (en) | 2020-04-14 |
CN111010389B CN111010389B (en) | 2022-10-18 |
Family
ID=70115724
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911269901.XA Active CN111010389B (en) | 2019-12-11 | 2019-12-11 | Code stream adjusting method and device, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111010389B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115174965A (en) * | 2022-06-30 | 2022-10-11 | 杭州海康威视数字技术股份有限公司 | Video preview method and device, electronic equipment and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140282776A1 (en) * | 2013-03-15 | 2014-09-18 | Cisco Technology, Inc. | Video content priority aware congestion management |
CN107342848A (en) * | 2017-08-24 | 2017-11-10 | 杭州联吉技术有限公司 | A kind of adaptive code stream transmission method, device and equipment |
CN109120852A (en) * | 2018-09-26 | 2019-01-01 | 深圳市共进电子股份有限公司 | Internet protocol camera system, web camera and security system |
CN109874031A (en) * | 2017-12-04 | 2019-06-11 | 华平信息技术股份有限公司 | Multipriority dynamic code rate method of adjustment and system based on network bandwidth prediction |
-
2019
- 2019-12-11 CN CN201911269901.XA patent/CN111010389B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140282776A1 (en) * | 2013-03-15 | 2014-09-18 | Cisco Technology, Inc. | Video content priority aware congestion management |
CN107342848A (en) * | 2017-08-24 | 2017-11-10 | 杭州联吉技术有限公司 | A kind of adaptive code stream transmission method, device and equipment |
CN109874031A (en) * | 2017-12-04 | 2019-06-11 | 华平信息技术股份有限公司 | Multipriority dynamic code rate method of adjustment and system based on network bandwidth prediction |
CN109120852A (en) * | 2018-09-26 | 2019-01-01 | 深圳市共进电子股份有限公司 | Internet protocol camera system, web camera and security system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115174965A (en) * | 2022-06-30 | 2022-10-11 | 杭州海康威视数字技术股份有限公司 | Video preview method and device, electronic equipment and computer readable storage medium |
CN115174965B (en) * | 2022-06-30 | 2024-01-02 | 杭州海康威视数字技术股份有限公司 | Video preview method, device, electronic equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111010389B (en) | 2022-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9674279B2 (en) | Methods, devices, and systems for allocating service nodes in a network | |
US9380108B2 (en) | Computer system | |
CN111865736B (en) | Equipment control method and device | |
KR101494143B1 (en) | Radio resource optimization method, device and system | |
RU2643626C1 (en) | Method of distributing acceptable packages, queue selector, package processing device and information media | |
CN101710905A (en) | Address resolution control method and system based on tactics | |
CN108293200B (en) | Device throughput determination | |
CN110198332B (en) | Scheduling method and device for content distribution network node and storage medium | |
US20190053169A1 (en) | Method for dynamic adaptation of a data rate | |
EP4021060A1 (en) | Detection method, apparatus and system | |
US20150146523A1 (en) | Multiple-interface network device and selection method for transmitting network packets | |
CN113518125A (en) | Offline data uploading method and system, storage medium and electronic device | |
CN111010389B (en) | Code stream adjusting method and device, storage medium and electronic device | |
US20160255011A1 (en) | Terminal Device, Terminal-Device Control Method, and Terminal-Device Control Program | |
CN113473449A (en) | Intelligent connection system based on Internet of things terminal | |
CN101341692B (en) | Admission control using backup link based on access network in Ethernet | |
CN112929452B (en) | Message collaborative pushing method based on Internet of things edge gateway | |
CN104871500A (en) | Communication node, control device, communication system, packet processing method, communication node control method, and program | |
CN116582493A (en) | Data center network link selection method and device and electronic equipment | |
CN109150708B (en) | Method and device for selecting data forwarding interface | |
CN110753001A (en) | Method and device for efficiently transmitting data and storage medium | |
CN104468382A (en) | Self-adaption selection method of congestion control algorithm module and system of congestion control algorithm module | |
WO2017193814A1 (en) | Service chain generation method and system | |
CN112752307A (en) | Control method, data processing apparatus, control system, and storage medium | |
CN109246760B (en) | Wireless local area network load balancing method based on power control, wireless access device and wireless access 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |