CN112669025B - Data resource supply charging method, device, medium and terminal equipment - Google Patents

Data resource supply charging method, device, medium and terminal equipment Download PDF

Info

Publication number
CN112669025B
CN112669025B CN202011552990.1A CN202011552990A CN112669025B CN 112669025 B CN112669025 B CN 112669025B CN 202011552990 A CN202011552990 A CN 202011552990A CN 112669025 B CN112669025 B CN 112669025B
Authority
CN
China
Prior art keywords
data
resource
unit
target
type
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
CN202011552990.1A
Other languages
Chinese (zh)
Other versions
CN112669025A (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.)
Guangxi Zhongke Shuguang Cloud Computing Co ltd
Original Assignee
Guangxi Zhongke Shuguang Cloud Computing 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 Guangxi Zhongke Shuguang Cloud Computing Co ltd filed Critical Guangxi Zhongke Shuguang Cloud Computing Co ltd
Priority to CN202011552990.1A priority Critical patent/CN112669025B/en
Publication of CN112669025A publication Critical patent/CN112669025A/en
Application granted granted Critical
Publication of CN112669025B publication Critical patent/CN112669025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a data resource supply charging method, which comprises the steps of determining a mapping interval in a resource storage area, extracting keywords from a resource request instruction, determining a target type and the total data amount of the target type, rapidly allocating required data resources for each unit, solving the technical problem of long data resource allocation time in the prior art, and improving the working efficiency of each unit in the data resource using process; and inserting the mark bytes into the distributed data resources by taking the preset unit value as an interval, counting the number of the residual mark bytes and the use duration in the target unit, realizing accurate charging, solving the technical problem that the charging data resources can not be accurately measured in the prior art, and improving the charging rationality of each unit in the use process of the data resources.

Description

Data resource supply charging method, device, medium and terminal equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a medium, and a terminal device for charging data resource supply.
Background
In the construction process of the smart city, respective data centers are established in all cities, and IT resources of the data centers are opened to all units of the city for use. In the process of using the data center IT resources, various inconveniences exist in each unit, such as: 1. the application flow is complex and the period is long; the traditional method is that each unit submits a resource application work order to a data center manager, the data center manager prepares IT resources according to a resource list in the work order, and the data resources are divided into units for use after the IT resources are prepared; 2. the charging cannot be accurately measured; the work order system applies for IT resources of the data center, the resources used by each unit need to be charged, and the actual use condition cannot be known due to online operation, so that accurate calculation cannot be performed in the metering and charging process.
Therefore, a data resource supply charging policy is urgently needed in the market at present, which can rapidly allocate the required data resources for each unit and realize accurate charging so as to improve the working efficiency and charging rationality of each unit in the data resource using process.
Disclosure of Invention
The invention provides a data resource supply charging method, which aims to solve the technical problems that in the prior art, data resource distribution time is long and accurate metering charging cannot be realized.
In order to solve the above technical problem, an embodiment of the present invention provides a data resource supply charging method, including:
receiving a resource request instruction, and determining a mapping interval in a resource storage area according to a domain name of the resource request instruction, wherein the resource storage area is provided with a plurality of storage units, each storage unit correspondingly stores different types of data resources, and the mapping interval is a storage unit set where the data resources requested by the domain name last time are located;
extracting keywords from the resource request instruction to obtain a data type of the data resource requested by the resource request instruction as a target type, and determining the total data amount of the target type;
determining a storage unit with a data type consistent with the target type in the mapping interval as a target unit, distributing required data resources in the target unit according to the total data amount, and inserting mark bytes in the distributed data resources at intervals of preset unit values, wherein the mark bytes execute a disappearing action when the unit value data resources where the mark bytes are located are used;
and counting the number of the residual marked bytes and the use duration in the target unit, and calculating according to a preset charging rule to obtain the resource metering cost.
As a preferred scheme, the resource storage area is divided into a plurality of storage units with the same size by an equal parallel network, each storage unit is provided with an index end, and the index end is provided with a data type of the storage unit where the index end is located;
the step of generating the mapping interval includes: acquiring a historical resource request instruction, and determining the last requested data type of each domain name according to the historical resource request instruction; determining a corresponding storage unit according to the data type of the last request of the domain name, and establishing an index relationship between the index end of the corresponding storage unit and the domain name to form a mapping interval corresponding to the domain name.
As a preferred scheme, the step of extracting the keyword from the resource request instruction to obtain the data type of the data resource requested by the resource request instruction as a target type, and determining the total amount of data of the target type includes:
extracting a domain name from the resource request instruction, and extracting a plurality of domain keywords from mass data according to the domain name;
weighting the domain keywords as weights, and performing text segmentation on the resource request instruction through a word segmentation technology to obtain a plurality of words;
performing semantic recognition on the words, extracting data keywords and quantity keywords, determining a target type according to the data keywords, and determining the total data amount of the target type according to the quantity keywords.
Preferably, the step of allocating the required data resources in the target unit according to the total amount of data and inserting the flag bytes in the allocated data resources at intervals of a preset unit value includes:
determining a charging unit of the target type as a preset unit value according to a preset charging rule;
and inserting mark bytes in the target unit by taking a preset unit value as a basic unit as a distance, wherein the product value of the total number of the mark bytes and the preset unit value is equal to the value of the total data.
Preferably, the flag byte is provided with a response instruction, and the flag byte is used for receiving and responding to a preset detection instruction and feeding back the response instruction;
the step of counting the number of remaining flag bytes in the target unit includes:
sending a preset detection instruction to the target unit so that the mark byte on the target unit responds to the preset detection instruction and feeds back a response instruction;
and counting the received response instructions to obtain the number of the residual mark bytes.
Preferably, the data resource supply charging method further includes:
and when the data type of any storage unit in the mapping interval is determined to be inconsistent with the target type, mutually connecting the index ends of each storage unit, comparing the rest of storage units in the resource storage area through the connecting channels of the index ends, and determining the storage unit with the data type consistent with the target type as the target unit.
Preferably, the data resource supply charging method further includes:
when the mapping interval corresponding to the domain name of the resource request instruction does not exist in the resource storage area, the index ends of the storage units are connected with each other, all the storage units in the resource storage area are compared through the connecting channels of the index ends, and the storage unit with the data type consistent with the target type is determined to be used as the target unit.
Accordingly, another embodiment of the present invention further provides a data resource supply charging apparatus, including:
the resource request module is used for receiving a resource request instruction and determining a mapping interval in a resource storage area according to a domain name of the resource request instruction, wherein the resource storage area is provided with a plurality of storage units, each storage unit correspondingly stores different types of data resources, and the mapping interval is a storage unit set where the data resources requested by the domain name last time are located;
the target type module is used for extracting keywords from the resource request instruction, obtaining the data type of the data resource requested by the resource request instruction as a target type, and determining the total data amount of the target type;
a resource allocation module, configured to determine a storage unit with a data type consistent with the target type in the mapping interval as a target unit, allocate a required data resource in the target unit according to the total data amount, and insert a flag byte in the allocated data resource at a preset unit value as a distance, where the flag byte performs a disappearing action when the unit value data resource where the flag byte is located is used;
and the resource charging module is used for counting the number of the residual mark bytes and the service life in the target unit and calculating the resource metering cost according to a preset charging rule.
As a preferred scheme, the resource storage area is divided into a plurality of storage units with the same size by an equal parallel network, each storage unit is provided with an index end, and the index end is provided with a data type of the storage unit where the index end is located;
the step of generating the mapping interval includes: acquiring a historical resource request instruction, and determining the last requested data type of each domain name according to the historical resource request instruction; determining a corresponding storage unit according to the data type of the last request of the domain name, and establishing an index relationship between the index end of the corresponding storage unit and the domain name to form a mapping interval corresponding to the domain name.
Preferably, the object type module includes:
a domain name extracting unit, configured to extract a domain name from the resource request instruction, and extract a plurality of domain keywords from the mass data according to the domain name;
the text segmentation unit is used for weighting the domain keywords as weights and performing text segmentation on the resource request instruction through a word segmentation technology to obtain a plurality of words;
the type determining unit is used for carrying out semantic recognition on the words, extracting data keywords and quantity keywords, determining a target type according to the data keywords, and determining the total data amount of the target type according to the quantity keywords.
Preferably, the resource allocation module is configured to allocate, according to the total amount of data, required data resources in the target unit, and insert a flag byte in the allocated data resources at a distance of a preset unit value, where the step includes:
determining a charging unit of the target type as a preset unit value according to a preset charging rule; and inserting mark bytes in the target unit by taking a preset unit value as a basic unit as a distance, wherein the product value of the total number of the mark bytes and the preset unit value is equal to the value of the total data.
Preferably, the flag byte is provided with a response instruction, and the flag byte is used for receiving and responding to a preset detection instruction and feeding back the response instruction;
the resource charging module is used in the step of counting the number of the remaining marked bytes in the target unit, and comprises:
sending a preset detection instruction to the target unit so that the mark byte on the target unit responds to the preset detection instruction and feeds back a response instruction; and counting the received response instructions to obtain the number of the residual mark bytes.
Preferably, the data resource supply charging apparatus further includes: a first indexing module;
the first index module is used for connecting the index ends of each storage unit when the data types of any storage unit in the mapping interval are determined to be inconsistent with the target types, comparing the rest of storage units in the resource storage area through the connecting channels of the index ends, and determining the storage unit with the consistent data type and the target type as the target unit.
Preferably, the data resource supply charging apparatus further includes: a second indexing module;
and the second index module is used for mutually connecting the index ends of each storage unit when determining that the mapping interval corresponding to the domain name of the resource request instruction does not exist in the resource storage area, comparing all the storage units in the resource storage area through the connecting channel of the index ends, and determining the storage unit with the data type consistent with the target type as the target unit.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program; wherein the computer program, when running, controls an apparatus in which the computer-readable storage medium is located to perform the data resource supply charging method according to any one of the above.
An embodiment of the present invention further provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements the data resource supply charging method according to any one of the above items when executing the computer program.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
according to the technical scheme, the mapping interval in the resource storage area is determined, the keyword extraction is carried out on the resource request instruction, the target type and the data total amount of the target type are determined, the required data resources can be rapidly distributed for each unit, the technical problem that the data resource distribution time is long in the prior art is solved, and the working efficiency of each unit in the data resource using process is improved; and inserting the mark bytes into the distributed data resources by taking the preset unit value as an interval, counting the number of the residual mark bytes and the use duration in the target unit, realizing accurate charging, solving the technical problem that the charging data resources can not be accurately measured in the prior art, and improving the charging rationality of each unit in the use process of the data resources.
Drawings
FIG. 1: the step flow chart of the charging method for data resource supply provided by the embodiment of the invention is shown;
FIG. 2: the structure diagram of the data resource supply charging device provided by the embodiment of the invention is shown;
FIG. 3: the structure diagram of an embodiment of the terminal device provided by the embodiment of the invention is shown.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, a flowchart of steps of a data resource supply charging method according to an embodiment of the present invention includes steps 101 to 104, where the steps are as follows:
step 101, receiving a resource request instruction, and determining a mapping interval in a resource storage area according to a domain name of the resource request instruction, wherein the resource storage area is provided with a plurality of storage units, each storage unit correspondingly stores different types of data resources, and the mapping interval is a storage unit set where the data resource requested by the domain name last time is located.
In an implementation manner of this embodiment, the resource storage area is divided into a plurality of storage units with the same size by an inter-equal parallel network, and each storage unit is provided with an index end, where the index end is provided with a data type of the storage unit where the index end is located.
The step of generating the mapping interval includes: acquiring a historical resource request instruction, and determining the last requested data type of each domain name according to the historical resource request instruction; determining a corresponding storage unit according to the data type of the last request of the domain name, and establishing an index relationship between the index end of the corresponding storage unit and the domain name to form a mapping interval corresponding to the domain name.
Specifically, before receiving a resource request instruction sent by each unit, a resource storage area is first constructed, and in order to facilitate charging and accurate metering, the resource storage area is composed of a plurality of identical storage units. In order to realize rapid resource allocation, each storage unit is provided with an index end, so that the data resources in the storage units are in index association with the domain names of the resource request instructions sent by the units. Then, historical instructions of previous resource requests of all units are collected, respective domain names are extracted from the instructions, and then index association of the domain names and the data types is carried out according to the data resource types requested by all the units, so that a mapping interval is formed.
After the above steps are performed, the resource request instructions sent by each unit are received, and according to the domain names of the instructions, the mapping interval corresponding to the domain name may be determined in the resource storage area. Therefore, the interval where the data resource required by the unit is located can be quickly locked by mapping the index relationship of each storage unit in the interval.
In another implementable manner of the first embodiment, the data resource supply charging method further includes:
when the mapping interval corresponding to the domain name of the resource request instruction does not exist in the resource storage area, the index ends of the storage units are connected with each other, all the storage units in the resource storage area are compared through the connecting channels of the index ends, and the storage unit with the data type consistent with the target type is determined to be used as the target unit.
Specifically, if the mapping interval is not searched in the resource storage area, it is proved that the domain name has not requested the resource before, and the resource request is performed for the domain name for the first time. The index ends of the storage units can be used for connection, all the storage units are compared, and when the data types of the storage units in the resource storage area are determined to be consistent with the target types, the data types can be used as the new mapping area of the domain name.
Step 102, extracting keywords from the resource request instruction, obtaining a data type of the data resource requested by the resource request instruction as a target type, and determining a total data amount of the target type.
In an implementation manner of this embodiment, the step 102 includes steps 1021 to 1023, and each step is as follows: step 1021, extracting a domain name from the resource request instruction, and extracting a plurality of domain keywords from mass data according to the domain name; step 1022, weighting the domain keywords as weights, and performing text segmentation on the resource request instruction through a word segmentation technology to obtain a plurality of words; and 1023, performing semantic recognition on the words, extracting data keywords and quantity keywords, determining a target type according to the data keywords, and determining the total data amount of the target type according to the quantity keywords.
Specifically, after the mapping interval is determined, it is necessary to determine which data resource actually is in the resource request instruction sent by the unit, and semantic extraction needs to be performed on the resource request instruction. In the step, in order to extract the semantics of the instruction more accurately, a domain name is used for searching and extracting mass data, and a plurality of keywords of the domain name on the network are obtained and become domain keywords. It should be noted that the mass data refers to mass data on the network, and the mass data may be directly downloaded by using a crawler technology to perform a search, or the domain name may be directly searched on the network. After the keywords of the domain name are obtained, word segmentation can be more accurate, weight weighting processing is carried out on the action of the word segmentation by using the extracted keywords, the keywords close to the domain name are easier to distinguish by word segmentation technology, the possibility of misoperation is reduced, and the semantic extraction accuracy is also improved. After the above-mentioned special word segmentation step, we can obtain the actually required data type and amount of the unit in the text segmentation, thereby determining the target type and the total amount of data thereof.
Step 103, determining a storage unit with a data type consistent with the target type in the mapping interval as a target unit, allocating required data resources in the target unit according to the total data amount, and inserting a flag byte in the allocated data resources at a preset unit value as a distance, wherein the flag byte executes a disappearing action when the unit value data resource in which the flag byte is located is used.
In an implementation manner of this embodiment, the step of allocating required data resources in the target unit according to the total amount of data and inserting flag bytes in the allocated data resources at intervals of a preset unit value includes:
determining a charging unit of the target type as a preset unit value according to a preset charging rule; and inserting mark bytes in the target unit by taking a preset unit value as a basic unit as a distance, wherein the product value of the total number of the mark bytes and the preset unit value is equal to the value of the total data.
Specifically, in consideration of the metering and charging problem in the later period of resource usage, in the process of determining the target type and the data total amount thereof and needing resource allocation, the data total amount is divided into unit value data resources of a plurality of basic units according to a preset unit value, so that metering and charging are facilitated, a flag byte is inserted at each basic unit, for example, 100 flag bytes are required to be inserted when the data resources of 100 basic units are inserted, and the flag byte disappears when the data resources of the basic unit where the flag byte is preset are used.
In another implementable manner of the first embodiment, the data resource supply charging method further includes: and when the data type of any storage unit in the mapping interval is determined to be inconsistent with the target type, mutually connecting the index ends of each storage unit, comparing the rest of storage units in the resource storage area through the connecting channels of the index ends, and determining the storage unit with the data type consistent with the target type as the target unit.
Specifically, if the target type required for the domain name at this time is not found in the mapping region, the index ends of the storage units may be used for connection, and the rest of the storage units are compared, and when it is determined that the data types of the rest of the storage units in the resource storage region are consistent with the target type, the data types may be used as the new mapping region for the domain name.
And 104, counting the number of the residual mark bytes and the service life in the target unit, and calculating according to a preset charging rule to obtain the resource metering cost.
In this embodiment, the flag byte carries a response instruction, and the flag byte is configured to receive and respond to a preset detection instruction and feed back the response instruction;
the step of counting the number of remaining flag bytes in the target unit includes: sending a preset detection instruction to the target unit so that the mark byte on the target unit responds to the preset detection instruction and feeds back a response instruction; and counting the received response instructions to obtain the number of the residual mark bytes.
Specifically, in order to facilitate metering and charging, the marking byte is used for feedback, and through the setting of the previous step, the marking byte disappears after the basic unit where the marking byte is located is used, and then, in order to determine the actual resource using condition of the user, the data resource usage of the user can be calculated only by counting the total amount of the remaining data resources. In order to achieve real-time metering and accurate metering, a response instruction is arranged on a mark byte, when the mark byte receives a preset detection instruction, the response instruction can be fed back in response to the preset detection instruction, the total amount of the remaining data resources can be calculated according to the data of the received response instruction, the actual resource using condition of a user is calculated, and the resource metering cost is obtained by combining the using duration. It should be noted that the usage duration may be obtained by a system recording time stamp, or by other means, and is not redundantly stated here.
According to the technical scheme, the mapping interval in the resource storage area is determined, the keyword extraction is carried out on the resource request instruction, the target type and the data total amount of the target type are determined, the required data resources can be rapidly distributed for each unit, the technical problem that the data resource distribution time is long in the prior art is solved, and the working efficiency of each unit in the data resource using process is improved; and inserting the mark bytes into the distributed data resources by taking the preset unit value as an interval, counting the number of the residual mark bytes and the use duration in the target unit, realizing accurate charging, solving the technical problem that the charging data resources can not be accurately measured in the prior art, and improving the charging rationality of each unit in the use process of the data resources.
Example two
Correspondingly, referring to fig. 2, a schematic structural diagram of a data resource supply charging device provided in an embodiment of the present invention includes a resource request module, a target type module, a resource allocation module, and a resource charging module, where each module specifically is as follows:
the resource request module is used for receiving a resource request instruction and determining a mapping interval in a resource storage area according to a domain name of the resource request instruction, wherein the resource storage area is provided with a plurality of storage units, each storage unit correspondingly stores different types of data resources, and the mapping interval is a storage unit set where the data resources requested by the domain name last time are located.
In an implementation manner of this embodiment, the resource storage area is divided into a plurality of storage units with the same size by an inter-equal parallel network, and each storage unit is provided with an index end, where the index end is provided with a data type of the storage unit where the index end is located.
The step of generating the mapping interval includes: acquiring a historical resource request instruction, and determining the last requested data type of each domain name according to the historical resource request instruction; determining a corresponding storage unit according to the data type of the last request of the domain name, and establishing an index relationship between the index end of the corresponding storage unit and the domain name to form a mapping interval corresponding to the domain name.
In another possible implementation manner of the second embodiment, the data resource supply charging apparatus further includes: a second indexing module; and the second index module is used for mutually connecting the index ends of each storage unit when determining that the mapping interval corresponding to the domain name of the resource request instruction does not exist in the resource storage area, comparing all the storage units in the resource storage area through the connecting channel of the index ends, and determining the storage unit with the data type consistent with the target type as the target unit.
And the target type module is used for extracting keywords from the resource request instruction, obtaining the data type of the data resource requested by the resource request instruction as a target type, and determining the total data amount of the target type.
In an implementation manner of this embodiment, the target type module includes: a domain name extracting unit, configured to extract a domain name from the resource request instruction, and extract a plurality of domain keywords from the mass data according to the domain name; the text segmentation unit is used for weighting the domain keywords as weights and performing text segmentation on the resource request instruction through a word segmentation technology to obtain a plurality of words; the type determining unit is used for carrying out semantic recognition on the words, extracting data keywords and quantity keywords, determining a target type according to the data keywords, and determining the total data amount of the target type according to the quantity keywords.
And the resource allocation module is used for determining a storage unit with the data type consistent with the target type in the mapping interval as a target unit, allocating required data resources in the target unit according to the total data amount, and inserting mark bytes in the allocated data resources by taking a preset unit value as an interval, wherein the mark bytes execute a disappearing action when the unit value data resources where the mark bytes are located are used.
In an implementation manner of this embodiment, the resource allocation module is configured to allocate, according to the total amount of data, required data resources in the target unit, and the step of inserting flag bytes in the allocated data resources at intervals of a preset unit value includes: determining a charging unit of the target type as a preset unit value according to a preset charging rule; and inserting mark bytes in the target unit by taking a preset unit value as a basic unit as a distance, wherein the product value of the total number of the mark bytes and the preset unit value is equal to the value of the total data.
In another possible implementation manner of the second embodiment, the data resource supply charging apparatus further includes: a first indexing module; the first index module is used for connecting the index ends of each storage unit when the data types of any storage unit in the mapping interval are determined to be inconsistent with the target types, comparing the rest of storage units in the resource storage area through the connecting channels of the index ends, and determining the storage unit with the consistent data type and the target type as the target unit.
And the resource charging module is used for counting the number of the residual mark bytes and the service life in the target unit and calculating the resource metering cost according to a preset charging rule.
In an implementation manner of this embodiment, the flag byte carries an answer instruction, and the flag byte is configured to receive and respond to a preset detection instruction to feed back the answer instruction.
The resource charging module is used in the step of counting the number of the remaining marked bytes in the target unit, and comprises: sending a preset detection instruction to the target unit so that the mark byte on the target unit responds to the preset detection instruction and feeds back a response instruction; and counting the received response instructions to obtain the number of the residual mark bytes.
EXAMPLE III
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program; wherein, when running, the computer program controls the device where the computer-readable storage medium is located to execute the data resource supply charging method according to any of the above embodiments.
Example four
Referring to fig. 3, which is a schematic structural diagram of a terminal device according to an embodiment of the present invention, the terminal device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the data resource supply charging method according to any of the foregoing embodiments when executing the computer program.
Preferably, the computer program may be divided into one or more modules/units (e.g., computer program) that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used for describing the execution process of the computer program in the terminal device.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, etc., the general purpose Processor may be a microprocessor, or the Processor may be any conventional Processor, the Processor is a control center of the terminal device, and various interfaces and lines are used to connect various parts of the terminal device.
The memory mainly includes a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like, and the data storage area may store related data and the like. In addition, the memory may be a high speed random access memory, may also be a non-volatile memory, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), and the like, or may also be other volatile solid state memory devices.
It should be noted that the terminal device may include, but is not limited to, a processor and a memory, and those skilled in the art will understand that the terminal device is only an example and does not constitute a limitation of the terminal device, and may include more or less components, or combine some components, or different components.
The above-mentioned embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, and it should be understood that the above-mentioned embodiments are only examples of the present invention and are not intended to limit the scope of the present invention. It should be understood that any modifications, equivalents, improvements and the like, which come within the spirit and principle of the invention, may occur to those skilled in the art and are intended to be included within the scope of the invention.

Claims (10)

1. A data resource supply charging method, comprising:
receiving a resource request instruction, and determining a mapping interval in a resource storage area according to a domain name of the resource request instruction, wherein the resource storage area is provided with a plurality of storage units, each storage unit correspondingly stores different types of data resources, and the mapping interval is a storage unit set where the data resources requested by the domain name last time are located;
extracting keywords from the resource request instruction to obtain a data type of the data resource requested by the resource request instruction as a target type, and determining the total data amount of the target type;
determining a storage unit with a data type consistent with the target type in the mapping interval as a target unit, distributing required data resources in the target unit according to the total data amount, and inserting mark bytes in the distributed data resources at intervals of preset unit values, wherein the mark bytes execute a disappearing action when the unit value data resources where the mark bytes are located are used;
and counting the number of the residual marked bytes and the use duration in the target unit, and calculating according to a preset charging rule to obtain the resource metering cost.
2. The data resource supply charging method of claim 1, wherein the resource storage area is divided into a plurality of storage units with the same size by an equal parallel network, each storage unit is provided with an index end, wherein the index end is provided with the data type of the storage unit;
the step of generating the mapping interval includes: acquiring a historical resource request instruction, and determining the last requested data type of each domain name according to the historical resource request instruction; determining a corresponding storage unit according to the data type of the last request of the domain name, and establishing an index relationship between the index end of the corresponding storage unit and the domain name to form a mapping interval corresponding to the domain name.
3. The data resource supply charging method according to claim 1, wherein the step of extracting the keyword from the resource request command to obtain a data type of the data resource requested by the resource request command as a target type, and determining a total amount of data of the target type includes:
extracting a domain name from the resource request instruction, and extracting a plurality of domain keywords from mass data according to the domain name;
weighting the domain keywords as weights, and performing text segmentation on the resource request instruction through a word segmentation technology to obtain a plurality of words;
performing semantic recognition on the words, extracting data keywords and quantity keywords, determining a target type according to the data keywords, and determining the total data amount of the target type according to the quantity keywords.
4. The data resource supply charging method of claim 1, wherein the step of allocating the required data resource in the target unit according to the total amount of data and inserting flag bytes in the allocated data resource at intervals of a preset unit value comprises:
determining a charging unit of the target type as a preset unit value according to a preset charging rule;
and inserting mark bytes in the target unit by taking a preset unit value as a basic unit as a distance, wherein the product value of the total number of the mark bytes and the preset unit value is equal to the value of the total data.
5. The data resource supply charging method according to claim 1, wherein the flag byte is provided with a response instruction, and the flag byte is used for receiving and responding to a preset detection instruction and feeding back the response instruction;
the step of counting the number of remaining flag bytes in the target unit includes:
sending a preset detection instruction to the target unit so that the mark byte on the target unit responds to the preset detection instruction and feeds back a response instruction;
and counting the received response instructions to obtain the number of the residual mark bytes.
6. The data resource supply charging method of claim 2, wherein the data resource supply charging method further comprises:
and when the data type of any storage unit in the mapping interval is determined to be inconsistent with the target type, mutually connecting the index ends of each storage unit, comparing the rest of storage units in the resource storage area through the connecting channels of the index ends, and determining the storage unit with the data type consistent with the target type as the target unit.
7. The data resource supply charging method of claim 2, wherein the data resource supply charging method further comprises:
when the mapping interval corresponding to the domain name of the resource request instruction does not exist in the resource storage area, the index ends of the storage units are connected with each other, all the storage units in the resource storage area are compared through the connecting channels of the index ends, and the storage unit with the data type consistent with the target type is determined to be used as the target unit.
8. A data resource supply charging apparatus, comprising:
the resource request module is used for receiving a resource request instruction and determining a mapping interval in a resource storage area according to a domain name of the resource request instruction, wherein the resource storage area is provided with a plurality of storage units, each storage unit correspondingly stores different types of data resources, and the mapping interval is a storage unit set where the data resources requested by the domain name last time are located;
the target type module is used for extracting keywords from the resource request instruction, obtaining the data type of the data resource requested by the resource request instruction as a target type, and determining the total data amount of the target type;
a resource allocation module, configured to determine a storage unit with a data type consistent with the target type in the mapping interval as a target unit, allocate a required data resource in the target unit according to the total data amount, and insert a flag byte in the allocated data resource at a preset unit value as a distance, where the flag byte performs a disappearing action when the unit value data resource where the flag byte is located is used;
and the resource charging module is used for counting the number of the residual mark bytes and the service life in the target unit and calculating the resource metering cost according to a preset charging rule.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored computer program; wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the data resource supply charging method according to any one of claims 1-7.
10. A terminal device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the data resource supply charging method according to any one of claims 1-7 when executing the computer program.
CN202011552990.1A 2020-12-24 2020-12-24 Data resource supply charging method, device, medium and terminal equipment Active CN112669025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011552990.1A CN112669025B (en) 2020-12-24 2020-12-24 Data resource supply charging method, device, medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011552990.1A CN112669025B (en) 2020-12-24 2020-12-24 Data resource supply charging method, device, medium and terminal equipment

Publications (2)

Publication Number Publication Date
CN112669025A CN112669025A (en) 2021-04-16
CN112669025B true CN112669025B (en) 2021-07-16

Family

ID=75408496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011552990.1A Active CN112669025B (en) 2020-12-24 2020-12-24 Data resource supply charging method, device, medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN112669025B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103607707A (en) * 2013-11-20 2014-02-26 中国联合网络通信集团有限公司 Resource distribution method and apparatus based on inverse computation charging
CN104484902A (en) * 2014-12-03 2015-04-01 广州万客达电子科技有限公司 Cloud-based car-sharing cost calculating and processing method
CN106533707A (en) * 2012-08-08 2017-03-22 华为技术有限公司 Charging control method as well as charging trigger function (CTF) and online charging system (OCS)
CN107547762A (en) * 2016-06-29 2018-01-05 中兴通讯股份有限公司 A kind of charging method and charge system
CN207304579U (en) * 2017-09-08 2018-05-01 深圳市智物联网络有限公司 A kind of Internet of Things application platform and accounting server
CN110752936A (en) * 2019-10-28 2020-02-04 斑马网络技术有限公司 Flow charging method and device, storage medium and electronic equipment
CN111786801A (en) * 2019-11-26 2020-10-16 北京京东尚科信息技术有限公司 Method and device for charging based on data flow
CN112085535A (en) * 2020-09-15 2020-12-15 北京凌云雀科技有限公司 Resource metering charging method, device, cluster and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030110044A1 (en) * 2001-12-06 2003-06-12 Nix John A. Distributed resource metering system for billing
US10432449B2 (en) * 2014-12-30 2019-10-01 Convida Wireless, Llc Semantics annotation and semantics repository for M2M systems

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106533707A (en) * 2012-08-08 2017-03-22 华为技术有限公司 Charging control method as well as charging trigger function (CTF) and online charging system (OCS)
CN103607707A (en) * 2013-11-20 2014-02-26 中国联合网络通信集团有限公司 Resource distribution method and apparatus based on inverse computation charging
CN104484902A (en) * 2014-12-03 2015-04-01 广州万客达电子科技有限公司 Cloud-based car-sharing cost calculating and processing method
CN107547762A (en) * 2016-06-29 2018-01-05 中兴通讯股份有限公司 A kind of charging method and charge system
CN207304579U (en) * 2017-09-08 2018-05-01 深圳市智物联网络有限公司 A kind of Internet of Things application platform and accounting server
CN110752936A (en) * 2019-10-28 2020-02-04 斑马网络技术有限公司 Flow charging method and device, storage medium and electronic equipment
CN111786801A (en) * 2019-11-26 2020-10-16 北京京东尚科信息技术有限公司 Method and device for charging based on data flow
CN112085535A (en) * 2020-09-15 2020-12-15 北京凌云雀科技有限公司 Resource metering charging method, device, cluster and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
云应用引擎的资源监控和计费机制研究;任怡等;《通信学报》;20120930;第192-200页 *

Also Published As

Publication number Publication date
CN112669025A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
CN111506498B (en) Automatic generation method and device of test case, computer equipment and storage medium
CN108090225B (en) Database instance running method, device and system and computer readable storage medium
US10430332B2 (en) System and method for performance tuning of garbage collection algorithms
CN104391749B (en) Resource allocation method and device
WO2019019644A1 (en) Push server allocation method and apparatus, and computer device and storage medium
US20200286100A1 (en) Payment complaint method, device, server and readable storage medium
CN111061752B (en) Data processing method and device and electronic equipment
DE102012215192A1 (en) Manage the heat distribution among memory modules of a computer system
US9063668B1 (en) Distributed memory allocation in multi-threaded programs
CN107291745B (en) Data index management method and device
CN116755891B (en) Event queue processing method and system based on multithreading
CN112328688B (en) Data storage method, device, computer equipment and storage medium
CN110750212A (en) Article publishing method and device, computer equipment and storage medium
CN113268501A (en) Report generation method and device
CN105812175A (en) Resource management method and resource management device
CN112631731A (en) Data query method and device, electronic equipment and storage medium
CN107147610B (en) Resource processing method and device
CN112669025B (en) Data resource supply charging method, device, medium and terminal equipment
CN106940710B (en) Information pushing method and device
CN113127327B (en) Test method and device for performance test
CN107330031A (en) A kind of method of data storage, device and electronic equipment
CN111061557B (en) Method and device for balancing distributed memory database load
CN107704362A (en) A kind of method and device based on Ambari monitoring big data components
CN109165305B (en) Characteristic value storage and retrieval method and device
CN115686746A (en) Access method, task processing method, computing device, and computer 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