Resource allocation method, device and computer equipment
By constructing an online terminal quantity matrix and an inter-grid distance matrix based on optical modem data, a resource allocation strategy was determined, which solved the problem of inaccurate resource consumption prediction and improved the accuracy and efficiency of resource allocation.
Patent Information
- Application Number
- CN202510045566.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-01-10
AI Technical Summary
In existing technologies, inaccurate prediction of resource consumption leads to low accuracy in resource allocation, especially in urban community management where the allocation of public resources such as water, electricity, and natural gas is not precise enough.
By acquiring traffic data detected by the optical modem, the installation address of the optical modem and the number of online terminals in the target area are determined. An online terminal quantity matrix and a grid distance matrix are constructed. Based on these matrices, the allocation strategy of the target resources is determined, including determining the optimal path and laying resource transmission pipelines.
It enables accurate resource demand forecasting and allocation based on the number of online terminals, improving the accuracy and efficiency of resource allocation, especially in load adjustment and resource transmission planning during peak power supply periods.
Smart Images

Figure CN119966920B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a resource allocation method and device and computer equipment. BACKGROUND
[0002] At present, urban community management is facing more and more challenges, especially in public resources such as water, electricity, natural gas and other basic livelihoods. In modern society, the population flow changes greatly, and the traditional population statistics, outdoor traffic monitoring and other methods cannot accurately reflect the public resource quantity required in the community or the community, resulting in low accuracy of resource consumption prediction and allocation. SUMMARY
[0003] The embodiments of the present application provide a resource allocation method, device and computer equipment to at least solve the technical problem of low resource allocation accuracy due to inaccurate resource consumption prediction in related technologies.
[0004] According to an aspect of an embodiment of the present application, a resource allocation method is provided, comprising: obtaining traffic data in a target area detected by an optical modem, and determining the installation address of the optical modem in the target area and the number of online terminals in the target area according to the traffic data; determining the node where the optical modem in the target area is located and the number of online terminals in each node according to the installation address of the optical modem, the node at least representing a residential area in the target area; determining an online terminal quantity matrix and a grid distance matrix based on the node where the optical modem in the target area is located and the number of online terminals in each node, wherein the online terminal quantity matrix is used to represent the number of online terminals in each node in the target area, and the grid distance matrix is used to represent the distance between each node; determining the allocation strategy of the target resource based on the online terminal quantity matrix and the grid distance matrix.
[0005] Optionally, determining the node where the optical modem in the target area is located and the number of online terminals according to the installation address of the optical modem comprises: obtaining the serial number of each optical modem in the target area from the traffic data; obtaining the installation address of each optical modem based on the serial number of each optical modem; obtaining the node where each optical modem is located by upwardly summarizing the address level contained in the installation address of each optical modem; determining the number of online terminals connected by each optical modem based on the media access control (MAC) address list of the online terminals of each optical modem; summarizing the number of online terminals connected by each optical modem to obtain the number of online terminals in each node, and storing the number of online terminals in each node in a first database.
[0006] Optionally, the determining the online terminal quantity matrix and the inter-grid distance matrix based on the nodes where the optical cats are located in the target region and the number of online terminals in each node comprises: receiving a data request, the data request comprising at least: the grid name corresponding to the target region; obtaining the number of online terminals in each node in the target region from the first database according to the grid name corresponding to the target region, and obtaining the distance between each node in the target region from the second database; constructing the online terminal quantity matrix based on the number of online terminals in each node in the target region, and constructing the inter-grid distance matrix based on the distance between each node in the target region.
[0007] Optionally, the determining the allocation strategy of the target resource based on the online terminal quantity matrix and the inter-grid distance matrix comprises: determining a hybrid matrix based on the online terminal quantity matrix and the inter-grid distance matrix, wherein an element in the hybrid matrix is used to represent a comprehensive weight between any two nodes, and the comprehensive weight is used to represent a weight score of resource allocation in the target region; and determining the allocation strategy of the target resource according to the hybrid matrix.
[0008] Optionally, the determining the hybrid matrix based on the online terminal quantity matrix and the inter-grid distance matrix comprises: obtaining a first weight corresponding to the online terminal quantity matrix and a second weight corresponding to the inter-grid distance matrix, wherein the first weight is determined according to an average value of all element values in the online terminal quantity matrix, and the second weight is determined according to an average value of all element values in the inter-grid distance matrix; and determining the hybrid matrix based on the first weight and the second weight.
[0009] Optionally, the method further comprises: in the case that the target resource is electricity consumption, obtaining an average annual electricity consumption; and determining the annual electricity consumption of a cell corresponding to each node according to the average annual electricity consumption and the number of online terminals in each node.
[0010] Optionally, the determining the allocation strategy of the target resource based on the hybrid matrix comprises: determining the allocation strategy as determining a path with the highest score between two nodes according to the hybrid matrix; laying a pipeline for transmitting the target resource based on the path with the highest score, and transmitting the target resource through the pipeline for transmitting the target resource.
[0011] According to another aspect of the embodiments of the present application, a resource allocation apparatus is also provided, comprising: an acquisition module configured to acquire traffic data in a target area by an optical modem, and determine installation addresses of the optical modems in the target area and an online terminal quantity in the target area according to the traffic data; a determination module configured to determine nodes in which the optical modems in the target area are located and the online terminal quantity in each node according to the installation addresses of the optical modems, the nodes being used to represent at least residential areas in the target area; a matrix module configured to determine an online terminal quantity matrix and a grid distance matrix based on the nodes in which the optical modems in the target area are located and the online terminal quantity in each node, the online terminal quantity matrix being used to represent the online terminal quantity of each node in the target area, and the grid distance matrix being used to represent distances between each node; and an allocation module configured to determine an allocation strategy of a target resource based on the online terminal quantity matrix and the grid distance matrix.
[0012] According to still another aspect of the embodiments of the present application, a computer device is also provided, comprising: a memory and a processor, wherein the memory is configured to store program instructions; and the processor, connected with the memory, is configured to execute the above-mentioned resource allocation method.
[0013] According to still another aspect of the embodiments of the present application, a non-volatile storage medium is also provided, comprising a stored computer program, wherein a device in which the non-volatile storage medium is located executes the above-mentioned resource allocation method by running the computer program.
[0014] According to still another aspect of the embodiments of the present application, a computer program product is also provided, comprising computer instructions, which, when executed by a processor, implement the above-mentioned resource allocation method.
[0015] In the embodiment of the present application, the traffic data in the target area detected by the optical modem is acquired, and the installation address of the optical modem in the target area and the number of online terminals in the target area are determined according to the traffic data; the node where the optical modem in the target area is located and the number of online terminals in each node are determined according to the installation address of the optical modem, and the node is used to represent at least the residential area in the target area; the online terminal quantity matrix and the inter-grid distance matrix are determined based on the node where the optical modem in the target area is located and the number of online terminals in each node, wherein the online terminal quantity matrix is used to represent the number of online terminals in each node in the target area, and the inter-grid distance matrix is used to represent the distance between each node; and the allocation strategy of the target resource is determined based on the online terminal quantity matrix and the inter-grid distance matrix, so as to achieve the purpose of determining the resource allocation strategy based on the number of online terminals in the target area, and to achieve the technical effect of accurately determining the resource demand quantity in the target area, thereby solving the technical problem of low resource allocation accuracy caused by inaccurate resource consumption quantity prediction in the related art. BRIEF DESCRIPTION OF DRAWINGS
[0016] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate the illustrative embodiments of the present application and their description serve to explain the present application, and do not constitute improper limitations on the present application. In the drawings:
[0017] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a resource allocation method according to an embodiment of the present application;
[0018] Figure 2 is a flowchart of a resource allocation method according to an embodiment of the present application;
[0019] Figure 3 is a traffic data analysis flowchart according to an embodiment of the present application;
[0020] Figure 4 is a merging diagram of the address where an online terminal is located according to an embodiment of the present application;
[0021] Figure 5 is a flowchart of data acquisition and output according to an embodiment of the present application;
[0022] Figure 6 is a target area node diagram according to an embodiment of the present application;
[0023] Figure 7 is a target resource allocation flowchart according to an embodiment of the present application;
[0024] Figure 8is a transmission line diagram of a target resource according to an embodiment of the present application;
[0025] Figure 9 is a flow chart of another resource allocation method according to an embodiment of the present application;
[0026] Figure 10 is a structural schematic diagram of a resource allocation apparatus according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the personnel in the technical field better understand the present application scheme, the technical scheme in the present application embodiment will be described clearly and completely below in combination with the drawings in the present application embodiment. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by the person skilled in the art without creative labor should belong to the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0029] The information collected by the embodiments of the present application is information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards in relevant regions, necessary security measures are taken, public order and good customs are not violated, and appropriate operation portals are provided for users to choose authorization or refuse automatic decision results; if the user chooses to refuse, the expert decision process is entered.
[0030] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:
[0031] Grid service: the grid service of the operator is to divide the service area into multiple grids through modern information technology means, and provide more refined services to users.
[0032] Public resources: public resources related to basic livelihood security, such as water, electricity, natural gas, communication resources, etc.
[0033] Modem: full name Modem, can convert optical signal transmitted by optical fiber into electrical signal and transmit signal to terminal equipment such as computer, mobile phone through wired or wireless network, is an important equipment for users to access operator optical fiber network.
[0034] Network management system: a kind of software system for monitoring and managing network equipment (including routers, switches, OLTs, etc.), mainly used for monitoring, configuring and fault diagnosis of network equipment. Through collecting and analyzing network operation information, realize the reasonable allocation of network resources, dynamic configuration of network load, optimization of network performance and reduction of network maintenance cost.
[0035] Standard address: according to the administrative division, the roads, communities and other buildings in the region are named according to the hierarchical relationship, which is used for the installation of broadband and other services.
[0036] Optimal path: it is a route from the starting point to the terminal, according to the evaluation criteria of distance, time, cost, social benefit, etc., to select an optimal route that meets the design expectation.
[0037] In order to solve the problems in the related art, the resource allocation method provided in the embodiments of the present application can be run in Figure 1 The computer terminal is explained and described as follows.
[0038] The resource allocation method provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal for implementing the resource allocation method is shown. As Figure 1 shown, the computer terminal 10 can include one or more (shown as 102a, 102b, …, 102n in the figure) processors (the processor can include but not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication function connected through wired and / or wireless network. In addition, it can also include display, keyboard, cursor control device, input / output interface (I / O interface), universal serial bus (USB) port (which can be included as one of the ports of the I / O interface), network interface, BUS bus. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can also include more Figure 1more or less components than those shown, or in configurations with different configurations of components than those shown. Figure 1
[0039] It should be noted that the one or more processors and / or other data processing circuitry described above can be generally referred to herein as "data processing circuitry." The data processing circuitry can be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuitry can be a single standalone processing module, or incorporated in whole or in part within any one of the other elements of the computer terminal 10. As referred to in embodiments of the present application, the data processing circuitry functions as a processor to control, for example, selection of the variable resistance terminal path in connection with the interface.
[0040] The memory 104 can be used to store software programs of application software and modules, such as program instructions / data storage means corresponding to the resource allocation method in embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, i.e., implements the resource allocation method described above. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory disposed remotely with respect to the processor, which can be connected to the computer terminal 10 through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0041] The transmission module 106 is configured to receive or send data via a network. Specific examples of the network can include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module configured to communicate with the Internet in a wireless manner.
[0042] The display can be, for example, a touch screen type liquid crystal display (LCD) that enables a user to interact with the user interface of the computer terminal 10.
[0043] It should be noted that in some alternative embodiments, the computer terminal described above Figure 1 It should be noted that the computer terminal described above can include hardware elements (including circuitry), software elements (including computer code stored on a computer readable medium), or a combination of both hardware and software elements. It should be noted that in some embodiments, the functionality described herein can be provided within dedicated computer systems or Figure 1 This is merely one instance of a specific, concrete example and is intended to illustrate the types of components that can be present in the computer terminal described above.
[0044] Under the above operating environment, an embodiment of the present application provides a resource allocation method embodiment. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order.
[0045] Figure 2 is a flowchart of a resource allocation method according to an embodiment of the present application, as shown in Figure 2 The method comprises the following steps:
[0046] Step S202, obtaining traffic data in a target area detected by an optical modem, and determining the installation address of the optical modem in the target area and the number of online terminals in the target area according to the traffic data;
[0047] In step S202, the traffic data sent by the optical modem can be received by the network management system for data analysis.
[0048] Step S204, determining the node where the optical modem in the target area is located and the number of online terminals in each node according to the installation address of the optical modem, the node at least indicating a residential area in the target area;
[0049] In step S204, the installation address of the optical modem can be queried through the serial number of the optical modem. In actual application scenarios, after each broadband account is registered and logged in through the optical modem, the actual installation address is determined according to the standard address bound to the account, and the residential area and single-family building in the target area can be represented as nodes.
[0050] Step S206, determining an online terminal quantity matrix and a grid distance matrix based on the node where the optical modem in the target area is located and the number of online terminals in each node, wherein the online terminal quantity matrix is used to represent the number of online terminals in each node in the target area, and the grid distance matrix is used to represent the distance between each node;
[0051] It should be noted that the target area can be regarded as a grid.
[0052] Step S208, determining a target resource allocation strategy based on the online terminal quantity matrix and the grid distance matrix.
[0053] Through the steps S202 to S208, the traffic data in the target area detected by the optical modem is acquired, and the installation address of the optical modem in the target area and the number of online terminals in the target area are determined according to the traffic data; the node where the optical modem in the target area is located and the number of online terminals in each node are determined according to the installation address of the optical modem, and the node is used to represent at least a residential cell in the target area; the online terminal quantity matrix and the inter-grid distance matrix are determined based on the node where the optical modem in the target area is located and the number of online terminals in each node, wherein the online terminal quantity matrix is used to represent the number of online terminals in each node in the target area, and the inter-grid distance matrix is used to represent the distance between each node; and the allocation strategy of the target resource is determined based on the online terminal quantity matrix and the inter-grid distance matrix, so as to achieve the purpose of determining the resource allocation strategy based on the number of online terminals in the target area, and to achieve the technical effect of accurately determining the resource demand quantity in the target area, thereby solving the technical problem of low resource allocation accuracy caused by inaccurate resource consumption prediction in the related art. The following will be described in detail.
[0054] In some embodiments of the present application, the specific steps of determining the node where the optical modem in the target area is located and the number of online terminals according to the installation address of the optical modem are as follows: the serial number of each optical modem in the target area is obtained from the traffic data; the installation address of each optical modem is obtained based on the serial number of each optical modem; the address level contained in the installation address of each optical modem is summarized upwards to obtain the node where each optical modem is located, wherein the node is used to represent a residential cell; the number of online terminals connected by each optical modem is determined based on the media access control (MAC) address list of the online terminals of each optical modem; and the number of online terminals connected by each optical modem is summarized to obtain the number of online terminals in each node, and the number of online terminals in each node is stored in a first database.
[0055] Figure 3 A traffic data analysis flowchart is shown as Figure 3 As shown, the traffic data analysis result is sent to the data analysis server through the network management system, wherein the traffic data analysis result contains parameters such as optical modem SN code (serial number) and online terminal MAC address of the terminal forwarding request, and the API interface is used to output the target area address and cell level address of each online optical modem and online terminal, the number of online optical modems and the number of online terminals analyzed by the data analysis server.
[0056] Specifically, as shown in Figure 4 Figure 4 The addresses of the plurality of online terminals are above, and the node where the plurality of online terminals are located is obtained after merging a plurality of address levels. It can be understood that the area range involved in the plurality of address levels from top to bottom decreases in turn, for example: province, city, community, building, unit and room in turn. Among them, the specific way of determining the online terminal quantity matrix and the inter-grid distance matrix based on the node where the optical modem in the target area is located and the number of online terminals in each node is: receiving a data request, the data request at least includes: the grid name corresponding to the target area; obtaining the number of online terminals in each node in the target area from the first database according to the grid name corresponding to the target area, and obtaining the distance between each node in the target area from the second database; constructing the online terminal quantity matrix based on the number of online terminals in each node in the target area, and constructing the inter-grid distance matrix based on the distance between each node in the target area.
[0057] Figure 5 A flowchart of data collection and output is shown, as shown in Figure 5 When collecting target area data, the optical modem receives a data request from the terminal as traffic data, and then the network management system analyzes the traffic data, obtains the target area node address from the address mapping database, and writes the number of online terminals in each node into the first database. In the case of collecting distance data, the grid name corresponding to the target area is obtained, the distance between nodes in the target area is obtained from the address mapping database (second database), and the number of online terminals in each node is obtained from the first database. Finally, the API interface is output.
[0058] In some embodiments of the present application, the specific steps of determining the allocation strategy of the target resource based on the online terminal quantity matrix and the inter-grid distance matrix are as follows: determining a hybrid matrix based on the online terminal quantity matrix and the inter-grid distance matrix, wherein the elements in the hybrid matrix are used to represent the comprehensive weight between any two nodes, and the comprehensive weight is used to represent the weight score of resource allocation in the target area; determining the allocation strategy of the target resource according to the hybrid matrix.
[0059] Among them, determining the hybrid matrix based on the online terminal quantity matrix and the inter-grid distance matrix includes: obtaining a first weight corresponding to the online terminal quantity matrix and a second weight corresponding to the inter-grid distance matrix, wherein the first weight is determined according to the average value of all element values in the online terminal quantity matrix, and the second weight is determined according to the average value of all element values in the inter-grid distance matrix; determining the hybrid matrix based on the first weight and the second weight.
[0060] Figure 6 A target area node diagram is shown, as shown in Figure 6As shown, including: different nodes (A, B, C, D, P, Q), and the different buildings contained in the nodes (for example: A1, B1, C1, etc.), wherein x represents the longitude of the node, y represents the dimension of the node, n represents the number of online terminals in the node, d represents the distance between nodes, for example: dbd represents the distance between node B and node D.
[0061] In Figure 6 The node schematic diagram as shown is taken as an example, and the obtained grid distance matrix M is as follows:
[0062]
[0063] In the formula, A, B, C, D, P, Q represent different nodes respectively, d a represents the distance between node A and node P, d ab represents the distance between node A and node B, d c represents the distance between node P and node C, d ac represents the distance between node A and node C, d ad represents the distance between node A and node D, d bd represents the distance between node B and node D, d cd represents the distance between node C and node D, d b represents the distance between node B and node Q, d d represents the distance between node D and node Q. ∞ represents that the nodes are not adjacent.
[0064] The online terminal quantity matrix N is as follows:
[0065]
[0066] In the formula, n a represents the number of online terminals contained in node A, n b represents the number of online terminals contained in node B, n c represents the number of online terminals contained in node C, n d represents the number of online terminals contained in node D.
[0067] Then the mixing matrix H can be determined by the following formula:
[0068] H = w·M + u·N
[0069] In the formula, u represents the first weight, and w represents the second weight.
[0070] Among them,
[0071] In the formula, d ijelement value of any element in matrix M, n ij element value of any element in matrix N, P represents node P, and Q represents node Q.
[0072] It should be noted that node P can be the starting point of the path connecting all nodes, and node Q can be the end point of the path connecting all nodes. Each element in the hybrid matrix H represents the comprehensive weight from one grid node to another, which reflects the score of the degree of influence of the number of online terminals and the distance between nodes on the path.
[0073] Optionally, the Dijkstra algorithm can be used to calculate the optimal path: by calculating the path with the smallest comprehensive weight between any two grid nodes using the weights in the hybrid matrix H. The algorithm starts from the starting node and gradually expands the search range until the end node is found. The calculation result of the optimal path will be used as the basis for the allocation and transmission of public resources, helping city managers to allocate and plan public resources more effectively. For example: each element in the hybrid matrix H represents the comprehensive cost or utility metric from one grid node to another. In this case, the elements of the hybrid matrix mainly consider two factors: the number of online terminals (i.e., the population density of the node) and the geographical distance between nodes. Specifically: the number of online terminals (population density) reflects the activity level or population of the node, which can indirectly represent the demand for public resources of the node. The more online terminals, the more likely there are more people in the node, and therefore the more likely there is greater consumption of public resources such as water, electricity, and natural gas. The geographical distance between nodes represents the degree of spatial proximity between two nodes, which directly affects the cost of transporting resources from one node to another, such as the length of pipeline installation, the loss of power transmission, etc. For example: the optimal path can be the path from one node to another with the smallest comprehensive cost. This step actually simulates the optimal transmission path of resources from the starting point to the end point.
[0074] In some embodiments of the present application, when the target resource is electricity consumption, the average annual electricity consumption is obtained; and the annual electricity consumption of the cell corresponding to each node is determined according to the average annual electricity consumption and the number of online terminals in each node.
[0075] As Figure 7 shown, with the grid node diagram as a reference, by adopting the technical solutions proposed herein, we can accurately obtain the number of terminals that are online in real time in the A, B, C, and D node cells (after screening, excluding non-population-related terminals such as cameras and smart home devices). These terminal numbers can be considered as the population numbers in the buildings of each cell, and the total electricity consumption can be calculated according to the per capita electricity consumption.
[0076] In the peak period of power supply, the power department can efficiently adjust and switch the power load according to the regional power consumption predicted by the scheme.
[0077] In some embodiments of the present application, the allocation strategy of the target resource is determined according to the mixed matrix, including: determining the allocation strategy as determining the path with the highest score between two nodes according to the mixed matrix; laying a pipeline for transmitting the target resource based on the path with the highest score, and transmitting the target resource through the pipeline for transmitting the target resource, as shown in Figure 8 As shown, node P is the starting point of the pipeline, and node Q is the end point of the pipeline. In the process of laying municipal pipelines, in order to ensure the effective use of resources and meet the actual demand, the capacity of pipelines such as tap water and natural gas is usually designed according to the population of the area. However, it is difficult for traditional statistical methods to obtain and reflect the changes in the resident population in real time.
[0078] In order to overcome this difficulty, the technical scheme proposed in this paper is adopted. Based on the number of online terminals and combined with historical data, the resident population and trends in the grid can be predicted. The demand for different public resources and the path of the pipeline with the lowest cost are accurately predicted.
[0079] Figure 9 A resource allocation system architecture diagram is shown, as shown in Figure 9 The flow information of different households is analyzed to output the allocation strategy of different public resources.
[0080] Figure 10 A resource allocation device according to an embodiment of the present application, the device comprises:
[0081] The acquisition module 210 is configured to acquire the flow data in the target area through the optical modem, and determine the installation address of the optical modem in the target area and the number of online terminals in the target area according to the flow data;
[0082] The determination module 310 is configured to determine the node where the optical modem in the target area is located and the number of online terminals in each node according to the installation address of the optical modem, and the node is at least used to represent the residential area in the target area;
[0083] The matrix module 410 is configured to determine the online terminal quantity matrix and the grid distance matrix based on the node where the optical modem in the target area is located and the number of online terminals in each node, wherein the online terminal quantity matrix is used to represent the number of online terminals in each node in the target area, and the grid distance matrix is used to represent the distance between each node;
[0084] The distribution module 510 is configured to determine the allocation strategy of the target resource based on the online terminal quantity matrix and the inter-grid distance matrix.
[0085] By means of the resource allocation device, the traffic data in the target area detected by the optical modem is acquired, and the installation address of the optical modem in the target area and the number of online terminals in the target area are determined according to the traffic data; the node where the optical modem in the target area is located and the number of online terminals in each node are determined according to the installation address of the optical modem, and the node is used to represent at least a residential area in the target area; the online terminal quantity matrix and the inter-grid distance matrix are determined based on the node where the optical modem in the target area is located and the number of online terminals in each node, wherein the online terminal quantity matrix is used to represent the number of online terminals in each node in the target area, and the inter-grid distance matrix is used to represent the distance between each node; and the allocation strategy of the target resource is determined based on the online terminal quantity matrix and the inter-grid distance matrix, so that the purpose of determining the resource allocation strategy based on the number of online terminals in the target area is achieved, the technical effect of accurately determining the resource demand in the target area is achieved, and the technical problem of low resource allocation accuracy caused by inaccurate resource consumption prediction in the related art is solved.
[0086] The determination module 310 comprises a determination sub-module, configured to determine the node where the optical modem in the target area is located and the number of online terminals according to the installation address of the optical modem, including: acquiring the serial number of each optical modem in the target area from the traffic data; acquiring the installation address of each optical modem based on the serial number of each optical modem; obtaining the node where each optical modem is located by upwardly summarizing the address level contained in the installation address of each optical modem; determining the number of online terminals connected by each optical modem based on the media access control (MAC) address list of the online terminals of each optical modem; and summarizing the number of online terminals connected by each optical modem to obtain the number of online terminals in each node, and storing the number of online terminals in each node in a first database.
[0087] The determination sub-module comprises a determination unit, configured to determine the online terminal quantity matrix and the inter-grid distance matrix based on the node where the optical modem in the target area is located and the number of online terminals in each node, including: receiving a data request, wherein the data request at least comprises the grid name corresponding to the target area; acquiring the number of online terminals in each node in the target area from the first database according to the grid name corresponding to the target area, and acquiring the distance between each node in the target area from a second database; constructing the online terminal quantity matrix based on the number of online terminals in each node in the target area, and constructing the inter-grid distance matrix based on the distance between each node in the target area.
[0088] The distribution module 510 comprises a strategy submodule for determining a distribution strategy of the target resource based on the online terminal quantity matrix and the inter-grid distance matrix, comprising: determining a hybrid matrix based on the online terminal quantity matrix and the inter-grid distance matrix, wherein an element in the hybrid matrix is used to represent a comprehensive weight between any two nodes, and the comprehensive weight is used to represent a weight score of resource distribution in the target area; and determining the distribution strategy of the target resource according to the hybrid matrix.
[0089] The strategy submodule comprises a strategy unit for determining a hybrid matrix based on the online terminal quantity matrix and the inter-grid distance matrix, comprising: obtaining a first weight corresponding to the online terminal quantity matrix and a second weight corresponding to the inter-grid distance matrix, wherein the first weight is determined according to an average value of all element values in the online terminal quantity matrix, and the second weight is determined according to an average value of all element values in the inter-grid distance matrix; and determining the hybrid matrix based on the first weight and the second weight.
[0090] The distribution module 510 comprises a distribution submodule for, in a case where the target resource is power consumption, obtaining an average annual power consumption; and determining an annual power consumption of a cell corresponding to each node according to the average annual power consumption and the number of online terminals in each node.
[0091] The strategy submodule comprises a strategy unit for determining a distribution strategy of the target resource according to the hybrid matrix, comprising: determining the distribution strategy as determining a path with the highest score between two nodes according to the hybrid matrix; and laying a pipeline for transmitting the target resource based on the path with the highest score, and transmitting the target resource through the pipeline for transmitting the target resource.
[0092] It should be noted that, Figure 10 The resource distribution device is used for executing the resource distribution method shown in the above description, and the related explanations in the above resource distribution method are also applicable to the resource distribution device, and will not be repeated here. Figure 2 The resource distribution method shown in the above description, and the related explanations in the above resource distribution method are also applicable to the resource distribution device, and will not be repeated here.
[0093] The embodiment of the present application also provides a computer device, comprising: a memory and a processor, wherein the memory is used to store program instructions; the processor is connected with the memory and is used to execute the above-mentioned resource distribution method.
[0094] The embodiment of the present application also provides a non-volatile storage medium, which comprises a stored computer program, wherein a device where the non-volatile storage medium is located executes the above-mentioned resource distribution method by running the computer program.
[0095] The embodiment of the present application further provides a computer program product comprising computer instructions, which, when executed by a processor, implement the steps of the resource allocation method in the present application.
[0096] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0097] In the above-mentioned embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0098] In the several embodiments provided in the present application, it should be understood that the disclosed technical contents can be implemented by other means. Among them, the above-mentioned device embodiments are only schematic, for example, the division of units can be a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed units can be indirect coupling or communication connection through some interfaces, units or modules, which can be electrical or other forms.
[0099] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they can be located in one place, or they can be distributed on multiple units. According to actual needs, part or all of the units can be selected to achieve the purpose of the present embodiment scheme.
[0100] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be realized in the form of hardware or in the form of software functional unit.
[0101] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0102] The above is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.
Claims
1. A resource allocation method characterized by, The method comprises the following steps: acquiring traffic data in a target area detected by an optical modem, and determining the installation address of the optical modem in the target area and the number of online terminals in the target area according to the traffic data; determining the node where each optical modem in the target area is located and the number of online terminals in each node according to the installation address of the optical modem, the node at least representing a residential area in the target area; determining an online terminal quantity matrix and a grid distance matrix based on the node where each optical modem in the target area is located and the number of online terminals in each node, wherein the online terminal quantity matrix is used to represent the number of online terminals in each node in the target area, and the grid distance matrix is used to represent the distance between each node; determining an allocation strategy of a target resource based on the online terminal quantity matrix and the grid distance matrix; determining an allocation strategy of a target resource based on the online terminal quantity matrix and the grid distance matrix, comprising: determining a hybrid matrix based on the online terminal quantity matrix and the grid distance matrix, wherein the elements in the hybrid matrix are used to represent the comprehensive weight between any two nodes, and the comprehensive weight is used to represent the weight score of resource allocation in the target area; determining the allocation strategy of the target resource according to the hybrid matrix; determining the hybrid matrix based on the online terminal quantity matrix and the grid distance matrix, comprising: acquiring a first weight corresponding to the online terminal quantity matrix and a second weight corresponding to the grid distance matrix, wherein the first weight is determined according to the average value of all element values in the online terminal quantity matrix, and the second weight is determined according to the average value of all element values in the grid distance matrix; determining the hybrid matrix based on the first weight and the second weight.
2. The method of claim 1, wherein, determining the node where each optical modem in the target area is located and the number of online terminals according to the installation address of the optical modem, comprising: acquiring the serial number of each optical modem in the target area from the traffic data; acquiring the installation address of each optical modem based on the serial number of each optical modem; summarizing the address level contained in the installation address of each optical modem upwards to obtain the node where each optical modem is located; determining the number of online terminals connected by each optical modem based on the media access control (MAC) address list of the online terminals of each optical modem; summarizing the number of online terminals connected by each optical modem to obtain the number of online terminals in each node, and storing the number of online terminals in each node in a first database.
3. The method of claim 2, wherein, determining the online terminal quantity matrix and the grid distance matrix based on the node where each optical modem in the target area is located and the number of online terminals in each node, comprising: receiving a data request, the data request at least including the grid name corresponding to the target area; acquiring the number of online terminals in each node in the target area from the first database according to the grid name corresponding to the target area, and acquiring the distance between each node in the target area from a second database; constructing the online terminal quantity matrix based on the number of online terminals in each node in the target area, and constructing the inter-grid distance matrix based on the distance between each node in the target area.
4. The method of claim 1, wherein, The method further comprises: in the case that the target resource is electricity consumption, obtaining average annual electricity consumption; determining annual electricity consumption of a cell corresponding to each node according to the average annual electricity consumption and the number of online terminals in each node.
5. The method of claim 1, wherein, determining an allocation strategy of the target resource according to the mixed matrix, comprising: determining the allocation strategy as a path with the highest score between two nodes according to the mixed matrix; laying a pipeline for transmitting the target resource based on the path with the highest score, and transmitting the target resource through the pipeline for transmitting the target resource.
6. A resource allocation apparatus characterized by comprising: comprising: a obtaining module, configured to obtain traffic data in a target area through an optical modem, and determine installation addresses of the optical modems in the target area and the number of online terminals in the target area according to the traffic data; a determining module, configured to determine nodes in which each optical modem in the target area is located and the number of online terminals in each node according to the installation addresses of the optical modems, wherein the nodes are used at least to represent residential cells in the target area; a matrix module, configured to determine an online terminal quantity matrix and an inter-grid distance matrix based on the nodes in which each optical modem in the target area is located and the number of online terminals in each node, wherein the online terminal quantity matrix is used to represent the number of online terminals in each node in the target area, and the inter-grid distance matrix is used to represent the distance between each node; a distribution module, configured to determine an allocation strategy of a target resource based on the online terminal quantity matrix and the inter-grid distance matrix; determining an allocation strategy of a target resource based on the online terminal quantity matrix and the inter-grid distance matrix, comprising: determining a mixed matrix based on the online terminal quantity matrix and the inter-grid distance matrix, wherein an element in the mixed matrix is used to represent a comprehensive weight between any two nodes, the comprehensive weight is used to represent a weight score of resource allocation in the target area; determining the allocation strategy of the target resource according to the mixed matrix; determining the mixed matrix based on the online terminal quantity matrix and the inter-grid distance matrix, comprising: obtaining a first weight corresponding to the online terminal quantity matrix and a second weight corresponding to the inter-grid distance matrix, wherein the first weight is determined according to an average value of all element values in the online terminal quantity matrix, and the second weight is determined according to an average value of all element values in the inter-grid distance matrix; determining the mixed matrix based on the first weight and the second weight.
7. A computer device, comprising: comprising: a memory and a processor, wherein the memory is used to store program instructions; the processor, connected with the memory, is used to execute the resource allocation method in any one of claims 1-5.
8. A computer program product comprising computer instructions, characterized in that, the computer instructions, when executed by the processor, implement the resource allocation method in any one of claims 1-5. the computer instructions, when executed by the processor, implement the resource allocation method in any one of claims 1-5.
Citation Information
Patent Citations
Communication connection method, device, mobile terminal and computer readable storage medium
CN108668335A
Traffic processing method, device and system and computer readable storage medium
CN113014507A