CN109947469B - Address division method, device and computer readable storage medium - Google Patents

Address division method, device and computer readable storage medium Download PDF

Info

Publication number
CN109947469B
CN109947469B CN201910179399.7A CN201910179399A CN109947469B CN 109947469 B CN109947469 B CN 109947469B CN 201910179399 A CN201910179399 A CN 201910179399A CN 109947469 B CN109947469 B CN 109947469B
Authority
CN
China
Prior art keywords
address
block
address block
target address
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910179399.7A
Other languages
Chinese (zh)
Other versions
CN109947469A (en
Inventor
付立明
彭卓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Anjia Internet Technology Co ltd
Original Assignee
Guangzhou Anjia Internet 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 Guangzhou Anjia Internet Technology Co ltd filed Critical Guangzhou Anjia Internet Technology Co ltd
Priority to CN201910179399.7A priority Critical patent/CN109947469B/en
Publication of CN109947469A publication Critical patent/CN109947469A/en
Application granted granted Critical
Publication of CN109947469B publication Critical patent/CN109947469B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides an address division method and device and a computer readable storage medium, and relates to the technical field of data processing. The address division method comprises the following steps: obtaining a target address from an address list, judging whether the target address and a preset address block meet preset conditions or not, obtaining a judgment result, wherein the address block is used for storing the target address, the address block is stored in the address block list, and finally, storing the target address into the target address block according to the judgment result, and the target address block corresponds to the judgment result. By judging whether the target address and the preset address block meet the preset condition or not and storing the target address into the corresponding target address block according to the judgment result, the address division is realized, the reading of the unnecessary address by the terminal when the address block is read is avoided, the time spent by the terminal for reading the unnecessary address is reduced, and the efficiency of the terminal for reading the address is improved.

Description

Address division method, device and computer readable storage medium
Technical Field
The invention relates to the technical field of data processing, in particular to an address division method, an address division device and a computer readable storage medium.
Background
With the continuous development of the internet of things technology, it has become a trend to construct an information system through various data acquisition in the production process, wherein reading addresses in a PLC (Programmable Logic Controller) through a terminal has become an indispensable link, and therefore, reading addresses in the PLC quickly and effectively through the terminal is becoming more and more important.
In the related technology, a terminal can obtain an initial address, sort the initial address to obtain the sorted address and obtain a preset maximum readable length, and uniformly block the sorted address according to the length to obtain a blocked address, wherein the blocked address comprises a plurality of address blocks.
However, in the related art, when reading a discontinuous address, an unnecessary address is read, and there is a problem that reading efficiency is low when a terminal reads an address.
Disclosure of Invention
The present invention aims to provide an address division method and device to solve the problem in the prior art that when a discontinuous address is read, an unnecessary address is read, and when a terminal reads the address, the reading efficiency is too low.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides an address partitioning method, where the method includes:
acquiring a target address from an address list;
judging whether the target address and at least one address block meet preset conditions or not to obtain a judgment result, wherein the address block is used for storing the target address, and the address block is stored in an address block list;
and storing the target address into a target address block according to the judgment result, wherein the target address block corresponds to the judgment result.
Further, judging whether the target address and the at least one address block meet preset conditions to obtain a judgment result, including:
judging whether the address block list comprises at least one address block or not to obtain a first judgment result;
the storing the target address into a target address block according to the judgment result includes:
if the first judgment result indicates that the address block list does not comprise at least one address block, creating the target address block;
storing the target address into the target address block.
Further, judging whether the target address and the at least one address block meet preset conditions to obtain a judgment result, further comprising:
if the first judgment result indicates that the address block list comprises at least one address block, acquiring a mark value of a first address block from the at least one address block, wherein the first address block is an address block with the maximum block mark value in the address block list;
judging whether the target address is smaller than the sum of the mark value and the maximum length of the first address block to obtain a second judgment result, wherein the mark value of the first address block is the minimum address in the first address block;
the storing the target address into a target address block according to the judgment result includes:
if the second judgment result indicates that the target address is not less than the sum of the mark value and the maximum length of the first address block, creating the target address block;
storing the target address into the target address block.
Further, the determining whether the target address and the address block satisfy a preset condition to obtain a determination result further includes:
if the second judgment result indicates that the target address is smaller than the sum of the mark value and the maximum length of the first address block, judging whether the target address is larger than the sum of the maximum address and the interval value in the first address block to obtain a third judgment result;
the storing the target address into a target address block according to the judgment result includes:
if the third judgment result indicates that the target address is not larger than the sum of the maximum address and the interval value in the first address block, creating the target address block, and storing the target address into the target address block;
and if the third judgment result indicates that the target address is larger than the sum of the maximum address and the interval value in the first address block, taking the first address block as the target address block, and storing the target address into the target address block.
Further, the method further comprises:
and if the target address block is created, taking the target address as a mark value of the target address block.
Further, the obtaining the target address from the address list includes:
acquiring an initial address;
sequencing the initial address to obtain a sequenced address list, wherein the sequenced address list comprises a plurality of addresses;
and acquiring the target address of a preset position.
Further, the acquiring the target address of the preset location includes:
judging whether the sorted address list comprises the address or not;
and if the ordered address list comprises the address, acquiring the target address of a preset position.
Further, after the storing the target address into a target address block according to the determination result, the method further includes:
and deleting the target address from the sorted address list.
In a second aspect, an embodiment of the present invention further provides an address partitioning apparatus, where the apparatus includes:
the acquisition module is used for acquiring a target address from the address list;
the judging module is used for judging whether the target address and at least one address block meet preset conditions or not to obtain a judging result, wherein the address block is used for storing the target address, and the address block is stored in an address block list;
and the storage module is used for storing the target address into a target address block according to the judgment result, and the target address block corresponds to the judgment result.
Further, the determining module is specifically configured to determine whether the address block list includes at least one address block, so as to obtain a first determination result;
the storage module is specifically configured to create the target address block if the first determination result indicates that the address block list does not include at least one address block; storing the target address into the target address block.
Further, the determining module is further specifically configured to, if the first determination result indicates that the address block list includes at least one address block, obtain a tag value of a first address block from the at least one address block, where the first address block is an address block in the address block list, where the block tag value of the first address block is the largest; judging whether the target address is smaller than the sum of the mark value and the maximum length of the first address block to obtain a second judgment result, wherein the mark value of the first address block is the minimum address in the first address block;
the storage module is further specifically configured to create the target address block if the second determination result indicates that the target address is not smaller than a sum of the mark value and the maximum length of the first address block; storing the target address into the target address block.
Further, the determining module is further specifically configured to determine whether the target address is greater than a sum of a maximum address and a maximum interval value in the first address block if the second determination result indicates that the target address is less than the sum of the mark value and the maximum length of the first address block, so as to obtain a third determination result;
the storage module is further specifically configured to create the target address block and store the target address into the target address block if the third determination result indicates that the target address is not greater than a sum of a maximum address and an interval value in the first address block; and if the third judgment result indicates that the target address is larger than the sum of the maximum address and the interval value in the first address block, taking the first address block as the target address block, and storing the target address into the target address block.
Further, the apparatus further includes a determining module, configured to, if the target address block is created, use the target address as a tag value of the target address block.
Further, the obtaining module is specifically configured to obtain an initial address; sequencing the initial address to obtain a sequenced address list, wherein the sequenced address list comprises a plurality of addresses; and acquiring the target address of a preset position.
Further, the obtaining module is further specifically configured to determine whether the ordered address list includes the address; and if the ordered address list comprises the address, acquiring the target address of a preset position.
Further, the apparatus further includes a deleting module, where the deleting module is configured to delete the target address from the ordered address list.
In a third aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the method in the first aspect.
The invention has the beneficial effects that: the embodiment of the invention provides an address division method and device, wherein a target address is obtained from an address list, whether the target address and a preset address block meet preset conditions or not is judged, a judgment result is obtained, the address block is used for storing the target address, the address block is stored in the address block list, and finally the target address is stored in the target address block according to the judgment result, wherein the target address block corresponds to the judgment result. By judging whether the target address and the preset address block meet the preset condition or not and storing the target address into the corresponding target address block according to the judgment result, the address division is realized, the reading of the unnecessary address by the terminal when the address block is read is avoided, the time spent by the terminal for reading the unnecessary address is reduced, and the efficiency of the terminal for reading the address is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of an address partitioning method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an address partitioning method according to another embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an address partitioning apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an address partitioning apparatus according to another embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an address partitioning apparatus according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of an address partitioning apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention.
Fig. 1 is a schematic flowchart of an address partitioning method according to an embodiment of the present invention; as shown in fig. 1, the method includes:
s101, acquiring a target address from the address list.
In order to improve the efficiency of the terminal in reading the address, the terminal needs to divide the address. Therefore, when the terminal divides the address, the terminal may first obtain an address list including a plurality of addresses, and then divide each address in the address list one by one, so that the terminal needs to obtain a target address, that is, one address that needs to be divided currently.
Specifically, the terminal may obtain an initial address, sort the initial address according to a parameter value corresponding to the initial address to obtain a sorted address list, and use an address at a preset position in the sorted address list as a target address to obtain the target address.
It should be noted that the sorted address list is an address list.
S102, judging whether the target address and the preset address block meet preset conditions or not, and obtaining a judgment result.
Wherein the address block is used for storing a target address, and the address block is stored in an address block list
After the terminal acquires the target address, whether the target address and the address block meet preset conditions needs to be judged first to obtain corresponding judgment results, so that in the subsequent steps, the terminal can divide and store the target address in different modes according to different judgment results.
Specifically, the terminal may determine whether the address block list includes an address block, create a target address block if the address block list does not include the address block, and determine whether the target address meets a preset condition according to a first address block in the address block list if the address block list includes the address block, to obtain a determination result.
And S103, storing the target address into a target address block according to the judgment result.
The target address block corresponds to the determination result, and the target address block may be the created address block or the first address block in the address block list.
Specifically, if the determination result indicates that the address block list does not include the address block, the terminal stores the target address in the created target address block, and if the determination result indicates that the address block list includes the address block, the terminal stores the target address in a first address block in the address block list, and the terminal may use the first address block as the target address block and store the target address in the target address block.
In practical application, the terminal can store the target address into the target address block according to the judgment result, thereby realizing reasonable division of the target address,
it should be noted that, the embodiment of the present invention is only described by taking one address as an example, and in practical applications, a plurality of addresses may be divided in the above manner, and the embodiment of the present invention does not specifically limit the number of divided addresses.
Further, the terminal may divide each address in the address list in turn, and may obtain the divided address block.
In summary, in the address partitioning method provided in the embodiments of the present invention, a target address is obtained from an address list, and then whether the target address and a preset address block meet a preset condition is determined, so as to obtain a determination result, where the address block is used to store the target address, the address block is stored in the address block list, and finally, the target address is stored in the target address block according to the determination result, and the target address block corresponds to the determination result. By judging whether the target address and the preset address block meet the preset condition or not and storing the target address into the corresponding target address block according to the judgment result, the address division is realized, the reading of the unnecessary address by the terminal when the address block is read is avoided, the time spent by the terminal for reading the unnecessary address is reduced, and the efficiency of the terminal for reading the address is improved.
Fig. 2 is a schematic flowchart of an address partitioning method according to another embodiment of the present invention; as shown in fig. 2, the method includes:
s201, acquiring a target address from the address list.
In order to improve the efficiency of reading an address by a terminal, when the terminal divides the address in the address list, the terminal needs to first obtain a target address from the address list, so that in the subsequent steps, the terminal can judge the target address and store the target address according to the judgment result.
Optionally, the terminal may obtain an initial address, sort the initial address to obtain a sorted address list, and finally obtain a target address of the preset location, where the sorted address list includes multiple addresses.
Specifically, the terminal obtains an initial address, sorts the initial address from small to large according to a parameter value corresponding to the initial address to obtain a sorted address list, obtains an address of a preset position, and takes the address of the preset position as a target address.
In addition, the address of the preset location, that is, the target address, may be an address with the smallest parameter value corresponding to the address in the currently sorted address list.
It should be noted that, in order to determine whether the addresses in the ordered address list are completely divided, in the process of obtaining the target address of the preset position, the terminal may determine whether the ordered address list includes the target address, and if the ordered address list includes the address, the target address of the preset position is obtained.
S202, judging whether the address block list comprises at least one address block or not, and obtaining a first judgment result.
After the terminal acquires the target address from the address list, the terminal needs to break whether the address block list comprises at least one address block or not to obtain a first judgment result, so that in the subsequent steps, the terminal can divide the target address according to the first judgment result.
The address block is used for storing a target address, and the address block is stored in the address block list.
In this embodiment of the present invention, if the first determination result indicates that the address block list includes at least one address block, S203 is executed, and if the first determination result indicates that the address block list does not include at least one address block, S207 is executed.
S203, if the first judgment result indicates that the address block list comprises at least one address block, acquiring a mark value of the first address block from the at least one address block.
After the terminal obtains the first judgment result, if the first judgment result indicates that the address block list includes at least one address block, the terminal may obtain the tag value of the first address block, so that in the subsequent step, the terminal may divide the target address block according to the tag value of the first address block.
The first address block is the address block with the maximum block mark value in the address block list.
Specifically, if the first determination result indicates that the address block list includes at least one address block, the terminal may obtain an address block with a maximum block tag value in the address block list, and obtain a tag value corresponding to the first address block by using the address block with the maximum block tag value as the first address block.
It should be noted that the first address block may include a plurality of addresses, and the flag value of the first address block may be an address with a minimum parameter value corresponding to the address in the first address block.
S204, judging whether the target address is smaller than the sum of the mark value and the maximum length of the first address block or not, and obtaining a second judgment result.
After the terminal acquires the tag value of the first address block from at least one address block, the terminal needs to judge the target address again according to the tag value of the first address block, so that in the subsequent steps, the terminal can divide the target address according to the second judgment result.
The mark value of the first address block is the minimum address in the first address block, the maximum length is preset, and the corresponding maximum length can be preset for the read PLC.
Specifically, the terminal may obtain the maximum length, calculate a sum of the tag value and the maximum length of the first address block, and determine whether the target address is smaller than the sum of the tag value and the maximum length of the first address block, to obtain a second determination result.
Of course, if the second determination result indicates that the target address is less than the sum of the tag value and the maximum length of the first address block, S205 is performed, and if the second determination result indicates that the target address is not less than the sum of the tag value and the maximum length of the first address block, S207 is performed.
S205, if the second judgment result indicates that the target address is smaller than the sum of the mark value and the maximum length of the first address block, whether the target address is larger than the sum of the maximum address and the interval value in the first address block is judged, and a third judgment result is obtained.
Wherein the interval value is preset. The interval value may be set according to the requirement for address division, may also be set through experience of a worker, and may also be set through other manners, which is not specifically limited in the embodiment of the present invention.
After the terminal obtains the second judgment result, if the second judgment result indicates that the target address is smaller than the sum of the mark value and the maximum length of the first address block, the terminal needs to judge the target address again to obtain a third judgment result, so that in the subsequent steps, the terminal can divide the target address according to the third judgment result.
In addition, if the second judgment result indicates that the target address is smaller than the sum of the mark value and the maximum length of the first address block, the address is in the storable range of the first address block, the target address is judged again, the target address can be accurately divided, and therefore reading of unnecessary addresses by the terminal can be reduced.
Specifically, the terminal may obtain a maximum address in the first address block, obtain a preset interval value, calculate a sum of the maximum address and the interval value in the first address block, determine whether the target address is greater than the sum of the maximum address and the interval value in the first address block, and obtain a third determination result.
It should be noted that if the third determination result indicates that the target address is not greater than the maximum sum of the address and the interval value in the first address block, S206 is executed, and if the third determination result indicates that the target address is greater than the maximum sum of the address and the interval value in the first address block, S207 is executed.
And S206, if the third judgment result indicates that the target address is not larger than the sum of the maximum address and the interval value in the first address block, taking the first address block as the target address block, and storing the target address into the target address block.
After the terminal obtains the third determination result, if the third determination result indicates that the target address is not greater than the sum of the maximum address and the interval value in the first address block, it indicates that the target address meets the condition for storing in the first address block, and therefore, the first address block can be used as the target address block, and the target address is stored in the target address block.
In practical application, if the third determination result indicates that the target address is not greater than the sum of the maximum address and the interval value in the first address block, it indicates that the interval between the target address and the maximum address in the first address block is within the preset interval value range, and the target address may be stored in the first address block, that is, the interval between adjacent addresses in the first address block is not greater than the interval value, and when the terminal reads the address block, reading of an unnecessary address may be reduced.
And S207, storing the target address into the created target address block.
The terminal carries out multiple judgments, correspondingly obtains multiple judgment results, and when the first judgment result indicates that the address block list does not comprise at least one address block, and when the second judgment result indicates that the target address is not smaller than the sum of the mark value and the maximum length of the first address block, or when the third judgment result indicates that the target address is larger than the sum of the maximum address and the interval value in the first address block, the terminal can create the target address block and store the target address into the created target address block.
Optionally, if the first determination result indicates that the address block list does not include at least one address block, a target address block is created, and the target address is stored in the target address block.
If the first judgment result indicates that the address block list does not include at least one address block, it indicates that a target address block needs to be created, that is, a first address block in the address block list is created, a target address is stored in the target address block, and the target address is divided into the created address blocks, that is, the target address blocks.
Optionally, if the second determination result indicates that the target address is not less than the sum of the mark value and the maximum length of the first address block, a target address block is created, and the target address is stored in the target address block.
Optionally, if the third determination result indicates that the target address is greater than the sum of the maximum address and the interval value in the first address block, a target address block is created, and the target address is stored in the target address block.
It should be noted that, if the second determination result indicates that the target address is not less than the sum of the mark value and the maximum length of the first address block, or if the third determination result indicates that the target address is greater than the sum of the maximum address and the interval value in the first address block, the process of creating the target address block and storing the target address into the target address block is similar to the process of creating the target address block according to the first determination result and storing the target address into the target address block, and details are not repeated here.
And S208, if the target address block is created, taking the target address as the mark value of the target address block.
After the terminal stores the target address into the created target address block, the terminal may use the target address as a tag value of the target address block, so that the terminal may obtain an identifier of the target address block, thereby facilitating division of other addresses in the ordered address list.
In addition, after the created target address block has no address and the target address is stored in the created target address block, the target address is the first address in the target address block, and then the terminal may use the target address as the tag value of the target address block.
And S209, deleting the target address from the sorted address list.
After the terminal uses the first address block as a target address block and stores a target address into the target address block, or if the target address block is created and the target address is used as a mark value of the target address block, the terminal may delete the target address from the ordered address list to obtain a currently ordered address list.
It should be noted that, in the embodiment of the present invention, one address is taken as an example for description, and the embodiment of the present invention may further divide each address in the sorted address list, so that S201 to S209 may be executed in a loop until the division of each address in the sorted address list is completed.
In summary, in the address partitioning method provided in the embodiments of the present invention, a target address is obtained from an address list, and then whether the target address and a preset address block meet a preset condition is determined, so as to obtain a determination result, where the address block is used to store the target address, the address block is stored in the address block list, and finally, the target address is stored in the target address block according to the determination result, and the target address block corresponds to the determination result. By judging whether the target address and the preset address block meet the preset condition or not and storing the target address into the corresponding target address block according to the judgment result, the address division is realized, the reading of the unnecessary address by the terminal when the address block is read is avoided, the time spent by the terminal for reading the unnecessary address is reduced, and the efficiency of the terminal for reading the address is improved.
Fig. 3 is a schematic structural diagram of an address partitioning apparatus according to an embodiment of the present invention, and as shown in fig. 3, the address partitioning apparatus includes:
an obtaining module 301, configured to obtain a target address from an address list;
a judging module 302, configured to judge whether a target address and at least one address block meet a preset condition, and obtain a judgment result, where the address block is used to store the target address, and the address block is stored in an address block list;
and the storage module 303 is configured to store the target address into a target address block according to the determination result, where the target address block corresponds to the determination result.
Optionally, the determining module 302 is specifically configured to determine whether the address block list includes at least one address block, so as to obtain a first determination result;
the storage module 303 is specifically configured to create a target address block if the first determination result indicates that the address block list does not include at least one address block; the target address is stored into a target address block.
Optionally, the determining module 302 is further specifically configured to, if the first determination result indicates that the address block list includes at least one address block, obtain a tag value of a first address block from the at least one address block, where the first address block is an address block in the address block list, where the block tag value of the first address block is the largest; judging whether the target address is smaller than the sum of the mark value and the maximum length of the first address block to obtain a second judgment result, wherein the mark value of the first address block is the minimum address in the first address block;
the storage module 303 is further specifically configured to create a target address block if the second determination result indicates that the target address is not less than a sum of the mark value and the maximum length of the first address block; the target address is stored into a target address block.
Optionally, the determining module 302 is further specifically configured to determine whether the target address is greater than a sum of a maximum address and a maximum distance value in the first address block if the second determination result indicates that the target address is less than the sum of the mark value and the maximum length of the first address block, so as to obtain a third determination result;
the storage module 303 is further specifically configured to create a target address block and store the target address into the target address block if the third determination result indicates that the target address is not greater than the sum of the maximum address and the interval value in the first address block; and if the third judgment result indicates that the target address is larger than the sum of the maximum address and the interval value in the first address block, taking the first address block as the target address block, and storing the target address into the target address block.
Optionally, as shown in fig. 4, the apparatus further includes a determining module 304, where the determining module 304 is configured to, if the target address block is created, use the target address as a tag value of the target address block.
Optionally, the obtaining module 301 is specifically configured to obtain an initial address; sequencing the initial addresses to obtain a sequenced address list, wherein the sequenced address list comprises a plurality of addresses; and acquiring a target address of the preset position.
Optionally, the obtaining module 301 is further specifically configured to determine whether the ordered address list includes an address; if the ordered address list comprises addresses, the target address of the preset position is obtained.
Optionally, as shown in fig. 5, the apparatus further includes a deleting module 305, where the deleting module 305 is configured to delete the target address from the sorted address list.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 6 is a schematic structural diagram of an address partitioning apparatus according to an embodiment of the present invention, where the apparatus may be integrated in a terminal device or a chip of the terminal device, and the terminal may be a computing device with a data processing function.
The device includes: a processor 601, a memory 602.
The memory 602 is used for storing programs, and the processor 601 calls the programs stored in the memory 602 to execute the above-mentioned method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, the present invention also provides a computer-readable storage medium comprising a program which, when executed by a processor, is adapted to perform the above-described method embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (8)

1. An address partitioning method, the method comprising:
acquiring a target address from an address list;
judging whether the target address and at least one address block meet preset conditions or not to obtain a judgment result, wherein the address block is used for storing the target address, and the address block is stored in an address block list;
storing the target address into a target address block according to the judgment result, wherein the target address block corresponds to the judgment result;
judging whether the target address and the at least one address block meet preset conditions or not to obtain a judgment result, wherein the judgment result comprises the following steps:
judging whether the address block list comprises at least one address block or not to obtain a first judgment result;
the storing the target address into a target address block according to the judgment result includes:
if the first judgment result indicates that the address block list does not comprise at least one address block, creating the target address block;
storing the target address into the target address block;
judging whether the target address and at least one address block meet preset conditions to obtain a judgment result, and further comprising:
if the first judgment result indicates that the address block list comprises at least one address block, acquiring a mark value of a first address block from the at least one address block, wherein the first address block is an address block with the maximum block mark value in the address block list;
judging whether the target address is smaller than the sum of the mark value and the maximum length of the first address block to obtain a second judgment result, wherein the mark value of the first address block is the minimum address in the first address block;
the storing the target address into a target address block according to the judgment result includes:
if the second judgment result indicates that the target address is not less than the sum of the mark value and the maximum length of the first address block, creating the target address block;
storing the target address into the target address block.
2. The method as claimed in claim 1, wherein said determining whether the target address and the address block satisfy a predetermined condition to obtain a determination result further comprises:
if the second judgment result indicates that the target address is smaller than the sum of the mark value and the maximum length of the first address block, judging whether the target address is larger than the sum of the maximum address and the interval value in the first address block to obtain a third judgment result;
the storing the target address into a target address block according to the judgment result includes:
if the third judgment result indicates that the target address is not larger than the sum of the maximum address and the interval value in the first address block, creating the target address block, and storing the target address into the target address block;
and if the third judgment result indicates that the target address is larger than the sum of the maximum address and the interval value in the first address block, taking the first address block as the target address block, and storing the target address into the target address block.
3. The method of any of claims 1 to 2, further comprising:
and if the target address block is created, taking the target address as a mark value of the target address block.
4. The method of any of claims 1 to 2, wherein said obtaining a target address from an address list comprises:
acquiring an initial address;
sequencing the initial address to obtain a sequenced address list, wherein the sequenced address list comprises a plurality of addresses;
and acquiring the target address of a preset position.
5. The method of claim 4, wherein said obtaining the target address of a preset location comprises:
judging whether the sorted address list comprises the address or not;
and if the ordered address list comprises the address, acquiring the target address of a preset position.
6. The method of claim 4, wherein after said storing the target address into a block of target addresses according to the determination, the method further comprises:
and deleting the target address from the sorted address list.
7. An address partitioning apparatus, the apparatus comprising:
the acquisition module is used for acquiring a target address from the address list;
the judging module is used for judging whether the target address and at least one address block meet preset conditions or not to obtain a judging result, wherein the address block is used for storing the target address, and the address block is stored in an address block list;
the storage module is used for storing the target address into a target address block according to the judgment result, and the target address block corresponds to the judgment result;
the judging module is specifically configured to judge whether the address block list includes at least one address block, and obtain a first judgment result;
the storage module is specifically configured to create the target address block if the first determination result indicates that the address block list does not include at least one address block; storing the target address into the target address block;
the judging module is further specifically configured to judge whether the address block list includes at least one address block, so as to obtain a first judgment result;
the storage module is further specifically configured to create the target address block if the first determination result indicates that the address block list does not include at least one address block; storing the target address into the target address block;
the determining module is further specifically configured to, if the first determination result indicates that the address block list includes at least one address block, obtain a tag value of a first address block from the at least one address block, where the first address block is an address block in the address block list, where the block tag value of the first address block is the largest; judging whether the target address is smaller than the sum of the mark value and the maximum length of the first address block to obtain a second judgment result, wherein the mark value of the first address block is the minimum address in the first address block;
the storage module is specifically configured to create the target address block if the second determination result indicates that the target address is not smaller than a sum of the mark value and the maximum length of the first address block; storing the target address into the target address block.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201910179399.7A 2019-03-08 2019-03-08 Address division method, device and computer readable storage medium Active CN109947469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910179399.7A CN109947469B (en) 2019-03-08 2019-03-08 Address division method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910179399.7A CN109947469B (en) 2019-03-08 2019-03-08 Address division method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109947469A CN109947469A (en) 2019-06-28
CN109947469B true CN109947469B (en) 2021-09-17

Family

ID=67009416

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910179399.7A Active CN109947469B (en) 2019-03-08 2019-03-08 Address division method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109947469B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103722893A (en) * 2013-12-23 2014-04-16 珠海天威技术开发有限公司 Consumable chip, working method of consumable chip and consumable container
CN104253748A (en) * 2014-09-24 2014-12-31 大唐移动通信设备有限公司 Routing method based on distributed architecture and routing system based on distributed architecture
CN104503707A (en) * 2014-12-24 2015-04-08 华为技术有限公司 Method and device for reading data
CN106455132A (en) * 2016-09-28 2017-02-22 广东欧珀移动通信有限公司 Method and apparatus for controlling multiple WIFI modules, and terminal device
CN106572461A (en) * 2016-10-11 2017-04-19 乐视控股(北京)有限公司 Data transmission control method and related device
CN107102951A (en) * 2016-02-19 2017-08-29 群联电子股份有限公司 Storage management method, memorizer control circuit unit and memorizer memory devices
CN107273053A (en) * 2017-06-22 2017-10-20 郑州云海信息技术有限公司 A kind of method and apparatus of digital independent
CN109218458A (en) * 2017-07-07 2019-01-15 中兴通讯股份有限公司 Wiring method, equipment and the computer readable storage medium of MAC Address
CN109426517A (en) * 2017-08-30 2019-03-05 比亚迪股份有限公司 Micro-control unit and its control method and control device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8868882B2 (en) * 2011-06-08 2014-10-21 Microsoft Corporation Storage architecture for backup application

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103722893A (en) * 2013-12-23 2014-04-16 珠海天威技术开发有限公司 Consumable chip, working method of consumable chip and consumable container
CN104253748A (en) * 2014-09-24 2014-12-31 大唐移动通信设备有限公司 Routing method based on distributed architecture and routing system based on distributed architecture
CN104503707A (en) * 2014-12-24 2015-04-08 华为技术有限公司 Method and device for reading data
CN107102951A (en) * 2016-02-19 2017-08-29 群联电子股份有限公司 Storage management method, memorizer control circuit unit and memorizer memory devices
CN106455132A (en) * 2016-09-28 2017-02-22 广东欧珀移动通信有限公司 Method and apparatus for controlling multiple WIFI modules, and terminal device
CN106572461A (en) * 2016-10-11 2017-04-19 乐视控股(北京)有限公司 Data transmission control method and related device
CN107273053A (en) * 2017-06-22 2017-10-20 郑州云海信息技术有限公司 A kind of method and apparatus of digital independent
CN109218458A (en) * 2017-07-07 2019-01-15 中兴通讯股份有限公司 Wiring method, equipment and the computer readable storage medium of MAC Address
CN109426517A (en) * 2017-08-30 2019-03-05 比亚迪股份有限公司 Micro-control unit and its control method and control device

Also Published As

Publication number Publication date
CN109947469A (en) 2019-06-28

Similar Documents

Publication Publication Date Title
CN109379398B (en) Data synchronization method and device
CN107247722B (en) File scanning method and device and intelligent terminal
CN108256813B (en) Task reminding method and server
CN102915344B (en) SQL (structured query language) statement processing method and device
CN117236236B (en) Chip design data management method and device, electronic equipment and storage medium
CN109947469B (en) Address division method, device and computer readable storage medium
CN103761060A (en) Data processing method and server
CN110609861A (en) Vehicle identification method and device, electronic equipment and storage medium
CN115374499A (en) Dimension marking method and device, electronic equipment and storage medium
CN114372071A (en) Table data deleting method and device, computer equipment and storage medium
CN114896298A (en) Same type label data prediction method, terminal device and storage medium
CN115065366A (en) Compression method, device and equipment of time sequence data and storage medium
CN114461363A (en) Task execution method and device and computer readable storage medium
CN111078384A (en) Method and device for migrating core data, computer equipment and storage medium
CN111782479A (en) Log processing method and device, electronic equipment and computer readable storage medium
CN113537392A (en) Similar image identification method and device, computing equipment and computer storage medium
CN112597162A (en) Data set acquisition method, system, device and storage medium
CN112860412A (en) Service data processing method and device, electronic equipment and storage medium
CN112835931A (en) Method and device for determining data acquisition frequency
CN113722292B (en) Disaster response processing method, device, equipment and storage medium of distributed data system
CN117009094B (en) Data oblique scattering method and device, electronic equipment and storage medium
CN111144509B (en) Method, device and computer for classifying system application programs
CN117610512A (en) Method, device and equipment for removing header and footer and storage medium
CN113064922A (en) Data continuity judging method, terminal equipment and storage medium
CN115964537A (en) Behavior data processing method, device and equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant