Business block distribution method and device of service facility, and computer equipment
By optimizing the allocation of service facilities' business blocks using solution vectors and objective fitness functions, the problem of unreasonable traditional delivery area settings is solved, thereby improving business processing efficiency and cost control.
Patent Information
- Application Number
- CN202410939038.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2026-01-13
AI Technical Summary
Traditional service facility delivery area allocation methods suffer from unreasonable area settings, resulting in low business processing efficiency and impacting store order volume, delivery time, and costs.
By obtaining the solution vector of the service facility, the matching business blocks are determined, and the individual fitness is calculated using the target fitness function. The solution vector is then updated until the preset conditions are met, thereby optimizing the allocation of business blocks.
It improved the business processing efficiency of service facilities, reduced the omission of business attribute information, optimized unreasonable initial allocation, and improved delivery efficiency and cost control.
Smart Images

Figure CN121328956A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for allocating business blocks for a service facility. Background Technology
[0002] With the development of artificial intelligence technology and the rapid development of e-commerce and delivery services in various service facilities, in order to improve the delivery efficiency of various service facilities such as convenience stores, supermarkets, and restaurants, it is usually necessary to pre-allocate the delivery areas of different service facilities. For example, spatial clustering can be performed based on the number of orders or delivery distance of a convenience store to form the corresponding delivery area of that convenience store (e.g., the delivery area of a convenience store is within 2 kilometers centered on the store). This reduces the long delivery time and high delivery costs caused by excessive delivery distances and improves the efficiency of delivery processing.
[0003] However, in traditional technologies, improving the efficiency of delivery operations for various service facilities typically aims to complete deliveries as quickly as possible, creating convenient delivery areas. The distance between a store and its delivery area often affects the number of orders a store receives; for example, a delivery area that is too small can lead to fewer orders and negatively impact store revenue. Simultaneously, the delivery area also affects delivery time and costs. Setting excessively large delivery areas to increase order volume can easily result in longer delivery times, increased costs, and significant expenses. Therefore, the traditional method of setting delivery areas based on the number of orders or delivery distance of service facilities still suffers from the problem of inefficient operation due to unreasonable area settings. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for allocating business blocks in service facilities that can improve the business processing efficiency of service facilities, in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a method for allocating business blocks for service facilities, including:
[0006] Obtain the solution vectors corresponding to each of the multiple service facilities; the solution vectors represent the block allocation results of the service facilities;
[0007] For each of the service facilities, at least one business block matching the service facility is determined based on the solution vector of the service facility, and business attribute information corresponding to the service facility is determined based on the at least one business block.
[0008] Obtain the target fitness function corresponding to the service facility, and determine the individual fitness corresponding to the service facility based on the target fitness function and the business attribute information;
[0009] When the individual fitness corresponding to the multiple service facilities does not meet the preset business block allocation conditions, a portion of the solution vectors corresponding to each of the multiple service facilities is updated;
[0010] Jump to the step of determining at least one business block matching the service facility based on the solution vector of the service facility for each service facility, until the individual fitness corresponding to the multiple service facilities meets the preset business block allocation conditions, and obtain the target solution vector corresponding to each of the multiple service facilities;
[0011] Based on the target solution vectors corresponding to each of the multiple service facilities, the allocation results of the business blocks corresponding to each of the multiple service facilities are determined.
[0012] Secondly, this application also provides a service facility business block allocation device, comprising:
[0013] The solution vector acquisition module is used to acquire the solution vectors corresponding to each of the multiple service facilities; the solution vectors represent the block allocation results of the service facilities.
[0014] The business attribute information determination module is used to determine, for each service facility, at least one business block matching the service facility based on the solution vector of the service facility, and to determine the business attribute information corresponding to the service facility based on the at least one business block;
[0015] An individual fitness determination module is used to obtain a target fitness function corresponding to the service facility, and determine the individual fitness corresponding to the service facility based on the target fitness function and the business attribute information.
[0016] The solution vector update module is used to update a portion of the solution vectors corresponding to each of the multiple service facilities when the individual fitness corresponding to the multiple service facilities does not meet the preset business block allocation conditions.
[0017] The target solution vector acquisition module is used to jump to the step of determining at least one business block that matches each service facility based on the solution vector of the service facility, until the individual fitness corresponding to the multiple service facilities meets the preset business block allocation conditions, and obtain the target solution vector corresponding to each of the multiple service facilities.
[0018] The business block allocation result acquisition module is used to determine the business block allocation result corresponding to each of the multiple service facilities based on the target solution vector corresponding to each of the multiple service facilities.
[0019] Thirdly, this application provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the service block allocation method described above.
[0020] Fourthly, this application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the service block allocation method described above.
[0021] Fifthly, this application provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the service block allocation method described above.
[0022] In the aforementioned service facility business block allocation method, apparatus, computer equipment, computer-readable storage medium, and computer program product, by obtaining the solution vectors of the block allocation results used by multiple service facilities to characterize the service facility, for each service facility, at least one business block matching the service facility is determined based on the solution vector of the service facility, and based on at least one business block, the business attribute information corresponding to the service facility is determined. Thus, from the perspective of the target fitness function corresponding to the service facility, combined with the business attribute information of the service facility, a comprehensive fitness calculation of the service facility can be performed, accurately obtaining the individual fitness corresponding to the service facility, and reducing the omission of business attribute information. Specifically, when the individual fitness of multiple service facilities does not meet the preset business block allocation conditions, a portion of the solution vectors corresponding to each service facility are updated, and the process jumps to the step of determining at least one business block matching the service facility based on its solution vector. This process continues until the individual fitness of multiple service facilities meets the preset business block allocation conditions, resulting in target solution vectors for each service facility. This allows for the initial block allocation results of the service facilities to be evaluated from the perspective of their individual fitness. When it is determined that the individual fitness of multiple service facilities meets the preset business block allocation conditions, the updating of the solution vectors and the evaluation of individual fitness for the service facilities are stopped, resulting in optimized target solution vectors for the service facilities. Furthermore, based on the target solution vectors corresponding to each service facility, the business block allocation results for each service facility are determined. Subsequently, business block allocation processing can be performed on the service facilities based on the optimized business block allocation results, overcoming the situation of unreasonable block allocation during the initial allocation of service facilities and further improving the business processing efficiency of the service facilities. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is an application environment diagram of a service facility business block allocation method in one embodiment;
[0025] Figure 2 This is a flowchart illustrating a service facility business block allocation method in one embodiment;
[0026] Figure 3 This is a flowchart illustrating the process of obtaining the target fitness function corresponding to the service facility in one embodiment;
[0027] Figure 4 This is a schematic diagram of the process for obtaining at least one business sub-graph corresponding to a service facility in one embodiment;
[0028] Figure 5 This is a flowchart illustrating the process of constructing a connectivity penalty fitness function corresponding to a service facility in one embodiment;
[0029] Figure 6 This is a schematic diagram illustrating the process of updating a portion of the solution vectors corresponding to multiple service facilities in one embodiment.
[0030] Figure 7 This is a flowchart illustrating the service facility's business block allocation method in another embodiment;
[0031] Figure 8 This is a structural block diagram of a service facility's business block allocation device in one embodiment;
[0032] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0034] The service facility business block allocation method provided in this application specifically relates to artificial intelligence technology and can be applied to various scenarios such as intelligent transportation, map navigation, assisted driving, and network media. Artificial intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. Artificial intelligence studies the design principles and implementation methods of various intelligent machines, enabling them to have perception, reasoning, and decision-making functions. Furthermore, artificial intelligence technology is a comprehensive discipline involving a wide range of fields, including both hardware and software technologies. Basic AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operating / interactive systems, and mechatronics. Pre-trained models, also known as large models or basic models, can be widely applied to downstream tasks in various directions of artificial intelligence after fine-tuning. Specifically, artificial intelligence software technology mainly includes several major areas such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0035] Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Specifically, machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and pre-trained learning. Pre-trained models represent the latest development in deep learning, integrating all of these techniques.
[0036] With the research and advancement of artificial intelligence (AI) technology, AI is being studied and applied in various fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, digital twins, virtual humans, robots, AI-generated content (AIGC), conversational interaction, smart healthcare, smart customer service, and game AI. It is believed that with the development of technology, AI will be applied in more fields and play an increasingly important role.
[0037] The service facility business block allocation method provided in this application embodiment specifically involves technologies such as machine learning in artificial intelligence technology, and can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, portable wearable devices, and aircraft. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be an independent physical broadcast control server, a broadcast control server cluster consisting of multiple physical broadcast control servers, or a cloud broadcast control server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 102 and the server 104 can be connected directly or indirectly through wired or wireless communication, and this embodiment does not impose any restrictions on this.
[0038] Both terminal 102 and server 104 can be used independently to execute the service facility business block allocation method provided in this embodiment, or they can work together to execute the service facility business block allocation method provided in this embodiment. For example, taking the collaborative execution of the service facility business block allocation method provided in this embodiment by terminal 102 and server 104, server 104 obtains solution vectors corresponding to multiple service facilities, where the solution vectors represent the block allocation results of the service facilities. For each service facility, server 104 determines at least one business block matching the service facility based on the solution vector, and determines the business attribute information corresponding to the service facility based on the at least one business block. Further, server 104 obtains the target fitness function corresponding to the service facility, and determines the individual fitness corresponding to the service facility based on the target fitness function and the business attribute information. Specifically, when the individual fitness of multiple service facilities does not meet the preset business block allocation conditions, a portion of the solution vectors corresponding to each of the multiple service facilities is updated, and the process jumps to the step of determining at least one business block matching the service facility based on its solution vector, until the individual fitness of multiple service facilities meets the preset business block allocation conditions, thus obtaining the target solution vectors corresponding to each of the multiple service facilities. Further, by determining the business block allocation results corresponding to each of the multiple service facilities based on their target solution vectors, the business block allocation results for each service facility are fed back to the terminal 102 deployed by each service facility, so that the users of the service facilities can view them and optimize and adjust the initial block allocation results of the corresponding service facilities based on the business block allocation results, thereby improving the business processing efficiency of the corresponding service facilities.
[0039] In one exemplary embodiment, such as Figure 2 As shown, a method for allocating service blocks for a service facility is provided, which is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S202 to S206. Wherein:
[0040] Step S202: Obtain the solution vectors corresponding to each of the multiple service facilities. The solution vectors represent the block allocation results of the service facilities.
[0041] Specifically, the existing block allocation results for each of the multiple service facilities are initialized, or random initialization is performed for multiple service facilities and multiple business blocks to obtain the solution vectors corresponding to each of the multiple service facilities. The service facilities can be convenience stores, supermarkets, restaurants, etc., and can be various facilities that provide delivery and store services.
[0042] The existing block allocation results for each service facility represent the business blocks currently allocated to that service facility. For example, service facility 1 has been allocated 5 business blocks (including business blocks 1, 3, 4, 7, and 10), and service facility 2 has also been allocated 5 business blocks (including business blocks 2, 5, 6, 8, and 9). Each service facility must be allocated at least one business block, and the same business block can only be allocated to one service facility.
[0043] Furthermore, based on the business block allocation scheme required by each service facility, such as the business block allocation scheme that requires n business blocks to be allocated to m service facilities, the solution vector corresponding to each service facility can be pre-set as a one-dimensional vector with a length of m*n, denoted as X, which includes m*n vector components. If X is transformed into an m*n matrix, filled with rows first and then columns, it is denoted as X*, where each element X* in matrix X* is... ij ∈{0,1},X* ij =1 means that the j-th service block is assigned to the i-th service facility, while X* ij =0 means that the j-th business block was not assigned to the i-th service facility.
[0044] The process of transforming the feasible solution of the business block allocation scheme required by each service facility (i.e., setting the solution vector corresponding to the service facility as a one-dimensional vector) from its solution space to the search space that the genetic algorithm can handle can be understood as the encoding process. Correspondingly, the process of transforming the genetic algorithm's solution space to the problem space (the process of obtaining the business block allocation results of n business blocks allocated to m service facilities) can be understood as the decoding process. It can be understood that by initializing the existing block allocation results of multiple service facilities, or by randomly initializing multiple service facilities and multiple business blocks, and setting the solution vector corresponding to the service facility as a one-dimensional vector, the resulting solution vector corresponding to the service facility can be represented as a one-dimensional vector X (including m*n vector components) or a matrix X* (m*n dimensions).
[0045] For example, the binary encoding (or Gray encoding, or real number encoding) in the genetic algorithm can be used to encode and initialize the n business blocks, m service facilities, and the currently allocated business blocks of the service facilities (or the allocation result of random allocation for multiple service facilities and multiple business blocks) according to the business block allocation scheme required by each service facility, such as the business block allocation scheme that requires n business blocks to be allocated to m service facilities respectively.
[0046] In the genetic algorithm, the binary encoding method uses a set of binary symbols (0,1) composed of binary symbols 0 and 1. The genotype of an individual is a binary encoded symbol string, and the length of the binary encoded symbol string is related to the required solution accuracy.
[0047] Specifically, when using binary encoding, the encoding process is as follows: if the value range of a certain parameter is [U1, U2], and a binary code symbol of length k is used to represent the parameter, then it generates a total of 2... k Different encodings can be used to represent the correspondence between parameters during encoding using the following formula (1):
[0048] 000000…0000=0→U1
[0049] 000000…0001=1→U1+δ
[0050] 000000…0010=2→U1+2δ Formula (1);
[0051] 111111…1111 = 2 k -1→ U2
[0052] in, .
[0053] Furthermore, when using binary encoding for decoding, the decoding process is as follows: if the encoding of a certain individual is b... k b k-1 …b2b1, then the corresponding decoding formula is as shown in formula (2) below:
[0054] Formula (2);
[0055] Given a parameter X ∈ [-1, 2], if X is encoded using 6-bit binary encoding, the total number of possible values is 26, and the accuracy of the optimal solution is... The range of binary to decimal is [0, 2]. 6 If you need to convert to the interval [-1, 2], you can use formula (2).
[0056] Step S204: For each service facility, determine at least one business block that matches the service facility based on the solution vector of the service facility, and determine the business attribute information corresponding to the service facility based on at least one business block.
[0057] Specifically, for each service facility, by decoding the solution vector corresponding to each service facility, the initial block allocation result corresponding to the service facility can be obtained, and by parsing the initial block allocation result, at least one business block matching each service facility can be obtained.
[0058] For example, decoding the solution vector corresponding to each service facility can be understood as transforming the solution vector X corresponding to each service facility into an m*n matrix X*, and then decoding the matrix X* to obtain each element X* in the matrix X*. ij The process of obtaining values. Where X* ij =1 means that the j-th service block is assigned to the i-th service facility, while X* ij =0 means that the j-th service block was not assigned to the i-th service facility. Therefore, we can determine the allocation based on the elements X* in the obtained matrix X*. ij The value of is used to obtain the allocation result of whether the j-th business block is allocated to the ith service facility, thereby obtaining at least one business block that matches the ith service facility, such as the j-th business block.
[0059] Furthermore, for each service facility, business attribute information corresponding to the service facility is determined based on at least one business block that matches each service facility. Specifically, for each business block within the at least one business block, a periodic estimated resource interaction volume (which can be understood as the periodic estimated sales volume of the business block) and a periodic estimated order volume are set. The period is not limited to annual, quarterly, or monthly periods. For the service facility, this specifically involves setting the periodic estimated resource interaction volume, periodic order volume, and spatial distance between the business block and the service facility for each business block, thus defining the corresponding business attribute information for that service facility.
[0060] Step S206: Obtain the target fitness function corresponding to the service facility, and determine the individual fitness corresponding to the service facility based on the target fitness function and business attribute information.
[0061] Specifically, for different service facilities, the target fitness function corresponding to each service facility is obtained, and the business attribute information corresponding to the corresponding service facility is obtained respectively, including the periodic estimated resource interaction volume, periodic estimated order volume and spatial distance between the service facility and at least one business block matched with the service facility, so as to determine the individual fitness corresponding to the service facility based on the target fitness function and business attribute information.
[0062] In this context, the degree to which an individual adapts to the environment represents fitness, while the fitness of a service facility specifically represents its degree of adaptation to the environment. Specifically, this is achieved by introducing a fitness function, which can be measured by each individual service facility, to calculate the probability of an individual being used within the group. This determines the adaptability of each service facility as an individual in the environment, thus yielding the individual fitness corresponding to that service facility.
[0063] Step S208: When the individual fitness of multiple service facilities does not meet the preset business block allocation conditions, update a portion of the solution vectors in the solution vectors corresponding to each of the multiple service facilities.
[0064] Specifically, by determining whether the individual fitness corresponding to multiple service facilities meets the preset business block allocation conditions, and when the individual fitness corresponding to multiple service facilities does not meet the preset business block allocation conditions, a portion of the solution vectors corresponding to each of the multiple service facilities are updated.
[0065] The preset business block allocation conditions can specifically include: the individual fitness of multiple service facilities reaching a preset fitness threshold; the change in the individual fitness of the same service facility before and after iteration being less than a preset change threshold; or the current iteration count for the same service facility reaching a preset number. The preset fitness threshold, preset change threshold, and preset number of iterations can be flexibly adjusted and set according to actual needs, and are not limited to a single or certain specific values.
[0066] Furthermore, when updating a portion of the solution vectors corresponding to each of the multiple service facilities, the updated solution vectors are obtained by performing cross-processing and mutation processing on a portion of the solution vectors corresponding to each of the multiple service facilities.
[0067] If the individual fitness of multiple service facilities meets the preset business block allocation conditions, such as the individual fitness of multiple service facilities reaching the preset fitness threshold, or the change in the individual fitness of the same service facility before and after iteration being less than the preset change threshold, or the current iteration number for the same service facility reaching the preset number, then the solution vector corresponding to each service facility when the preset business block allocation conditions are met will be determined as the target solution vector corresponding to each service facility.
[0068] Step S210: Jump to the step of determining at least one business block that matches each service facility based on the solution vector of the service facility, until the individual fitness of multiple service facilities meets the preset business block allocation conditions, and obtain the target solution vector corresponding to each of the multiple service facilities.
[0069] Specifically, after updating a portion of the solution vectors corresponding to each of the multiple service facilities, i.e., obtaining the updated multiple solution vectors, the process jumps to the step of determining at least one business block matching the service facility based on its solution vector. That is, iterative processing is performed on the solution vectors of the multiple service facilities. During the iterative processing, if the individual fitness of the multiple service facilities meets the preset business block allocation conditions, the iterative processing is stopped, and the target solution vectors corresponding to the multiple service facilities are obtained.
[0070] The iterative processing for the solution vectors of multiple service facilities includes: 1) For each service facility, determining at least one business block matching the service facility based on its solution vector, and determining the business attribute information corresponding to the service facility based on the at least one business block; 2) Obtaining the target fitness function corresponding to the service facility, and determining the individual fitness corresponding to the service facility based on the target fitness function and the business attribute information; 3) Determining whether the individual fitness corresponding to multiple service facilities meets the preset business block allocation conditions; 4) When the individual fitness corresponding to multiple service facilities does not meet the preset business block allocation conditions, updating a portion of the solution vectors corresponding to each of the multiple service facilities.
[0071] Furthermore, if the individual fitness of multiple service facilities meets preset business block allocation conditions, such as the individual fitness of multiple service facilities reaching a preset fitness threshold, or the change in the individual fitness of the same service facility before and after iteration being less than a preset change threshold, or the current iteration count for the same service facility reaching a preset number, then the solution vector corresponding to each service facility when the preset business block allocation conditions are met is determined as the target solution vector corresponding to each service facility. The target solution vector corresponds to the business block allocation result that meets the actual needs after optimizing and adjusting the initial solution vector of the service facility.
[0072] Step S212: Determine the business block allocation results for each of the multiple service facilities based on their respective target solution vectors.
[0073] Specifically, by decoding the target solution vectors corresponding to each of the multiple service facilities, the allocation results of the business blocks corresponding to each of the multiple service facilities are obtained. By parsing the allocation results of each business block, at least one business block matching each service facility can be obtained.
[0074] The method of decoding the target solution vector can be understood as transforming the target solution vector X corresponding to each service facility into an m*n matrix X*, and then decoding the matrix X* to obtain each element X* in the matrix X*. ijThe process of obtaining values. Where X* ij =1 means that the j-th service block is assigned to the i-th service facility, while X* ij =0 means that the j-th service block was not assigned to the i-th service facility. Therefore, we can determine the allocation based on the elements X* in the obtained matrix X*. ij The value of is used to obtain the allocation result of whether the j-th service block is allocated to the ith service facility. By parsing the allocation result of each service block, such as the allocation result of the j-th service block, at least one service block that matches the ith service facility can be obtained, such as the j-th service block.
[0075] In the above-mentioned service facility business block allocation method, by obtaining the solution vectors of the block allocation results used by each of the multiple service facilities to represent the service facility, for each service facility, at least one business block matching the service facility is determined based on the solution vector of the service facility, and based on at least one business block, the business attribute information corresponding to the service facility is determined. Thus, from the perspective of the target fitness function corresponding to the service facility, combined with the business attribute information of the service facility, a comprehensive fitness calculation of the service facility can be performed, accurately obtaining the individual fitness corresponding to the service facility, and reducing the omission of business attribute information. Specifically, when the individual fitness of multiple service facilities does not meet the preset business block allocation conditions, a portion of the solution vectors corresponding to each service facility are updated, and the process jumps to the step of determining at least one business block matching the service facility based on its solution vector. This process continues until the individual fitness of multiple service facilities meets the preset business block allocation conditions, resulting in target solution vectors for each service facility. This allows for the initial block allocation results of the service facilities to be evaluated from the perspective of their individual fitness. When it is determined that the individual fitness of multiple service facilities meets the preset business block allocation conditions, the updating of the solution vectors and the evaluation of individual fitness for the service facilities are stopped, resulting in optimized target solution vectors for the service facilities. Furthermore, based on the target solution vectors corresponding to each service facility, the business block allocation results for each service facility are determined. Subsequently, business block allocation processing can be performed on the service facilities based on the optimized business block allocation results, overcoming the situation of unreasonable block allocation during the initial allocation of service facilities and further improving the business processing efficiency of the service facilities.
[0076] In one exemplary embodiment, such as Figure 3 As shown, the steps for obtaining the target fitness function corresponding to the service facility include steps S302 to S306. Wherein:
[0077] Step S302: Construct the basic fitness function corresponding to the service facility, determine the connectivity judgment result corresponding to the service facility, and construct the connectivity penalty fitness function corresponding to the service facility based on the connectivity judgment result.
[0078] Specifically, by determining the total resource interaction amount determination function, the delivery business cost determination function, and the rental cost determination function corresponding to the service facility, and by merging the total resource interaction amount determination function, the delivery business cost determination function, and the rental cost determination function according to the basic fitness function calculation method, the basic fitness function corresponding to the service facility can be obtained.
[0079] The basic fitness function is calculated as follows: resource interaction total determination function - delivery business cost determination function - rental cost determination function. That is, the basic fitness function corresponding to the service facility is obtained by merging the resource interaction total determination function, delivery business cost determination function and rental cost determination function according to the basic fitness function calculation method. The specific expression form is "resource interaction total determination function - delivery business cost determination function - rental cost determination function".
[0080] In an exemplary embodiment, the step of constructing a function to determine the total amount of resource interactions corresponding to the service facility includes:
[0081] 1) Obtain the local service resource interaction volume corresponding to the service facility, and obtain the periodic estimated resource interaction volume corresponding to at least one business block matching the service facility;
[0082] Specifically, for each service facility, the local service resource interaction volume FS corresponding to the service facility is obtained. i For example, sales figures for convenience stores, supermarkets, and restaurants, and the estimated periodic resource interaction volume (BS) corresponding to at least one business block matching the service facilities. j For example, the estimated sales revenue for at least one business segment over a period of time (including annual estimated sales revenue, quarterly estimated sales revenue, and monthly estimated sales revenue).
[0083] 2) For each business block in at least one business block, obtain the spatial distance matrix between the business block and the service facility, determine the spatial distance between the business block and the service facility, and construct the distance decay function corresponding to the business block based on the periodic estimated resource interaction volume and spatial distance.
[0084] Specifically, for each business block in at least one business block, a spatial distance matrix corresponding to the business block and the service facility is obtained, and the spatial distance D between the business block and the service facility is determined from the spatial distance matrix. ijSpecifically, when allocating business blocks, the distance attenuation of the periodic estimated resource interaction volume of the business block needs to be considered (i.e., the spatial distance between the service facility and the business block affects the periodic estimated resource interaction volume of the business block matched with the corresponding service facility). Therefore, it is specifically based on the periodic estimated resource interaction volume BS. j and spatial distance D ij Construct the distance decay function FD(BS) corresponding to the business block. j D ij Among them, the distance decay function FD(BS) j D ij Specifically, it can be used to represent the periodic estimated resource interaction volume and the spatial distance D between the source and user base (BS). ij They are inversely proportional.
[0085] Specifically, for each service facility, the spatial distance between the service facility and each business block is determined by traversing each of the multiple business blocks. A spatial distance matrix is pre-established based on this spatial distance. When constructing the distance attenuation function for a business block, the pre-established spatial distance matrix between the business block and the service facility can be obtained to calculate the spatial distance between the business block and the service facility. The calculated spatial distances include, but are not limited to, Euclidean distance, Manhattan distance, and navigation distance.
[0086] For example, there are m service facilities S = {S1, S2, S3, …, Sm} and n pre-divided business blocks B = {B1, B2, B3, …, Bn}. The pre-division methods include, but are not limited to, grid-based division, natural street-based division, and defined area-based division. For each service facility Si, all business blocks Bj are traversed, and the spatial distance between the i-th service facility and the j-th business block is calculated. A spatial distance matrix is pre-established based on the spatial distance between each service facility and each business block. , where D ij The element in the i-th row and j-th column of the distance matrix represents the spatial distance between the i-th service facility and the j-th business block. The spatial distance matrix is represented as an m*n real matrix.
[0087] 3) Construct a function to determine the total amount of resource interaction corresponding to the service facility based on the local service resource interaction volume, the periodically estimated resource interaction volume, the distance decay function, and the solution vector.
[0088] Specifically, for the i-th service facility, based on the local service resource interaction volume FS corresponding to the i-th service facility... iThe estimated periodic resource interaction volume (BS) of the j-th business block j For the distance decay function FD(BS) corresponding to the j-th service block j D ij ), and the solution vector X* ij Construct a function SS to determine the total amount of resource interaction corresponding to the i-th service facility. i The function SS determines the total resource interaction amount corresponding to the i-th service facility. i The following formula (3) is used to represent it:
[0089] Formula (3);
[0090] Among them, SS i FS represents the function that determines the total amount of resource interaction for the i-th service facility. i X* represents the local service resource interaction volume of the i-th service facility. ij Let FD(BS) represent the solution vector for the i-th service facility. j D ij Let represent the distance decay function between the i-th service facility and the j-th service block. Here, n represents the number of service blocks, and j represents the j-th service block.
[0091] In one exemplary embodiment, a function for determining the delivery service cost corresponding to the service facility is constructed, including:
[0092] 1) Obtain the estimated order volume for the period corresponding to at least one business block that matches the service facility;
[0093] Specifically, for each service facility, obtain the estimated periodic order volume (BO) corresponding to at least one business block that matches the service facility. j For example, the estimated annual order volume, or the estimated quarterly order volume, or the estimated monthly order volume for at least one business block.
[0094] 2) Construct a delivery unit price determination function based on the spatial distance between the service facility and at least one business block;
[0095] Specifically, the delivery cost of an order equals the delivery price per order multiplied by the number of orders. If the delivery price per order is set to c, then the specific function determining the delivery price is c(D). ij The delivery unit price determination function c(D) is obtained. ij () is about delivery distance D ij (i.e., the spatial distance D between service facilities and business blocks) ij The function, specifically, is to construct a delivery unit price determination function c(D) for a service facility for a business block based on the spatial distance between the service facility and at least one business block.ij ).
[0096] Among them, the delivery unit price determination function c(D) ij Specifically, the calculation formula can be the spatial distance between service facilities and business blocks multiplied by a certain constant coefficient, or it can be a step function about distance. The formula can be set according to the actual application scenario.
[0097] 3) Based on the solution vector, the delivery unit price determination function, and the periodic estimated order volume, construct the delivery business cost determination function corresponding to the service facilities.
[0098] Specifically, for the i-th service facility, the solution vector X* corresponding to the i-th service facility... ij Delivery unit price determination function c(D) ij ), and the estimated periodic order volume (BO) corresponding to at least one business block matching the service facilities. j By integrating these components, a delivery service cost determination function C corresponding to the i-th service facility is constructed. i .
[0099] Wherein, the delivery service cost determination function C corresponding to the i-th service facility i Specifically, it is expressed using the following formula (4):
[0100] Formula (4);
[0101] Among them, C i Let X* be the function for determining the delivery operation cost of the i-th service facility. ij Let c(D) represent the solution vector for the i-th service facility. ij ) represents the delivery unit price determination function constructed for the i-th service facility for the j-th business block, BO j This represents the estimated order volume for the period corresponding to the j-th business block. Here, n indicates the number of business blocks, and j represents the j-th business block.
[0102] In an exemplary embodiment, when determining the rental cost determination function corresponding to the service facility, R is set. i Let represent the rental cost of the i-th service facility. The rental cost is a factor relating to the total resource interaction SS corresponding to the service facility. i The function of the current year Y, i.e., R i (SS) i (Y). Specifically, by obtaining the pre-set rental logic relationship for the i-th service facility, the rental cost determination function R corresponding to the i-th service facility is obtained based on the rental logic relationship. i (SS) i ,Y).
[0103] In an exemplary embodiment, the following formula (5) is used to represent the function SS for determining the total amount of resource interaction. i Delivery service cost determination function C i and the rental cost determination function R i (SS) i The basic fitness function AS corresponding to the service facility is constructed (Y). i :
[0104] Formula (5);
[0105] Among them, AS i SS represents the basic fitness function for the construction of service facilities. i Let C represent the function that determines the total amount of resource interaction for the i-th service facility. i Let R be the function for determining the delivery operation cost of the i-th service facility. i (SS) i Let ,Y) represent the rental cost determination function corresponding to the i-th service facility. Here, n represents the total number of business blocks, j represents the j-th business block, and m represents the total number of service facilities.
[0106] In an exemplary embodiment, for each service facility, a connectivity judgment result corresponding to the service facility is determined, and a connectivity penalty fitness function corresponding to the service facility is constructed based on the connectivity judgment result.
[0107] Among them, through the basic fitness function AS i Based on this, a connectivity penalty fitness function T corresponding to the service facilities is constructed. ij To address the issue of service facilities' delivery areas being disconnected from the service facilities themselves, penalties are imposed on certain business blocks within the delivery area in order to meet the connectivity requirements of the delivery area as much as possible.
[0108] For example, if the i-th service facility can deliver to the j-th business block, i.e., X* ij =1 The connectivity judgment result for the i-th service facility is further determined, specifically whether the business blocks of the i-th service facility itself (e.g., the i-th business block) and the business blocks requiring delivery (e.g., the j-th business block) satisfy connectivity requirements. If the connectivity judgment result for the i-th service facility is that connectivity is not satisfied, then the corresponding connectivity judgment result is N=-1.
[0109] Specifically, after obtaining the connectivity assessment results for each service block from the service facility, a connectivity penalty matrix Neg is constructed for that service facility based on the connectivity assessment results for each service block.ij Furthermore, based on the constructed connectivity penalty matrix Neg ij Solution vector X* ij And the weight vector matrix W preset for the business blocks. j The connectivity penalty fitness function T corresponding to the service facility is obtained by fusion. ij .
[0110] Specifically, the connectivity penalty fitness function T corresponding to the service facility is constructed using the following formula (6). ij :
[0111] Formula (6);
[0112] Among them, T ij Neg is the fitness function for connectivity penalties corresponding to service facilities. ij W is the connectivity penalty matrix. j W is a pre-defined weight vector matrix for business blocks. j It can be set according to actual needs, including but not limited to all values being 1 or any real number, or set as the estimated resource interaction volume (BS) for each business block. i And so on. Where m represents a total of m service facilities.
[0113] Step S304: Obtain at least one business subgraph corresponding to the service facility, determine the node degree of at least one business subgraph, and construct the contour fitness function corresponding to the service facility based on the node degree of at least one business subgraph.
[0114] Specifically, by obtaining at least one business subgraph corresponding to the service facility, and for each business subgraph in the at least one business subgraph, obtaining the number of edges of each node in each business subgraph, and determining the node degree corresponding to the business subgraph based on the number of edges of each node in each business subgraph, a contour fitness function corresponding to the service facility is constructed based on the node degree and solution vector of the at least one business subgraph.
[0115] The delivery area of a service facility (i.e., a business area consisting of at least one business block) typically has connectivity requirements and a neat and aesthetically pleasing outline. To optimize the neatness and aesthetics of the outline, each store's delivery area should ideally have as few connected but relatively isolated blocks as possible. Quantifying this can be considered as maximizing the degree centrality of all nodes in the subgraph formed by each service facility's delivery area. This can be achieved by constructing an outline fitness function and calculating its maximum value to obtain a subgraph with maximum degree centrality, thereby ensuring the neatness and aesthetics of the service facility's delivery area outline.
[0116] For example, the business subgraph SubG corresponding to the i-th service facility is calculated using the following formula (7). i Corresponding node degree i :
[0117] Formula (7);
[0118] Among them, Degree i SubG is the business subgraph corresponding to the i-th service facility. i The corresponding node degree, B i Represents the business subgraph SubG i The edges in.
[0119] Specifically, the business subgraph SubG i It can be viewed as an undirected graph composed of distance and adjacency matrices, where E(SubG) is the distance and adjacency matrix. i () represents the business subgraph SubG i The number of edges in the graph is calculated twice for each edge in an undirected graph. Therefore, formula (5) can be simplified to formula (8) as follows:
[0120] Formula (8);
[0121] Among them, Degree i SubG is the business subgraph corresponding to the i-th service facility. i The corresponding node degree, E(SubG) i () represents the business subgraph SubG i The number of sides in the middle.
[0122] Furthermore, the contour fitness function L corresponding to the service facility is constructed using the following formula (9). i :
[0123] Formula (9);
[0124] Among them, L i For the contour fitness function corresponding to the service facility, E(SubG) i () represents the business subgraph SubG i The number of sides in the middle, 2E (SubG) i () represents the business subgraph SubG corresponding to the i-th service facility. i The corresponding node degree. Here, m represents the number of service facilities, which also corresponds to m business subgraphs.
[0125] Step S306: The basic fitness function, the connectivity penalty fitness function, and the contour fitness function are weighted and fused to obtain the target fitness function corresponding to the service facility.
[0126] Specifically, by obtaining the pre-set weights for the basic fitness function, the connectivity penalty fitness function, and the contour fitness function, and by weighting and fusing the basic fitness function, the connectivity penalty fitness function, and the contour fitness function according to the pre-set weights, the target fitness function corresponding to the service facility is obtained.
[0127] Furthermore, specifically using the following formula (10), it is expressed that based on the basic fitness function AS i Connectivity penalty fitness function T ij and the contour fitness function L i After weighted fusion, the resulting target fitness function P corresponding to the service facilities is constructed. ij :
[0128] Formula (10);
[0129] Among them, P ij Let α represent the target fitness function corresponding to the service facility, and let α represent the fitness function T with regard to connectivity penalty. ij Pre-set weights, β represents the pre-set weights for the contour fitness function, Neg ij W is the connectivity penalty matrix. j For the pre-defined weight vector matrix E(SubG) for the business block, i () represents the business subgraph SubG i The number of middle edges. Among them, SS i Let C represent the function that determines the total amount of resource interaction for the i-th service facility. i Let R be the function for determining the delivery operation cost of the i-th service facility. i (SS) i Y) represents the function for determining the rental cost of the i-th service facility.
[0130] In an exemplary embodiment, based on the target fitness function P corresponding to the service facility ij When determining the individual fitness of a service facility, based on business attribute information such as the periodic estimated resource interaction volume, periodic estimated order volume, and spatial distance between the service facility and at least one business block matched with the service facility, the following applies to each service facility:
[0131] First, determine the basic fitness level corresponding to the service facilities, including: 1) determining the function SS using the total amount of resource interaction. iBased on the local service resource interaction volume of the i-th service facility, the solution vector of the i-th service facility (with a value of 1 or 0), and the spatial distance between the i-th service facility and at least one matching business block, determine the total resource interaction volume of the i-th service facility; 2) Use the delivery business cost to determine the function C i Based on the solution vector of the i-th service facility (which takes the value of 1 or 0), the estimated order volume corresponding to the j-th business block, and the function c(D) determined based on the delivery unit price. ij 1) Determine the delivery unit price for a single order, and then determine the delivery operation cost corresponding to the i-th service facility; 2) Use the rental cost determination function R i (SS) i 4) Determine the rental cost of the i-th service facility according to the method of "determining the total amount of resource interaction - determining the delivery business cost - determining the rental cost".
[0132] Secondly, determine the penalty fitness corresponding to the service facility, including: using the connectivity penalty fitness function T corresponding to the service facility. ij According to the connectivity penalty matrix Neg ij And the weight vector matrix W preset for the business block j Determine the appropriate level of punishment for the service facilities.
[0133] Third, determine the contour fitness corresponding to the service facility, including: using the contour fitness function L corresponding to the service facility. i According to the business subgraph SubG corresponding to the i-th service facility i The corresponding node degree determines the contour adaptability corresponding to the service facility.
[0134] Third, determine the individual fitness corresponding to the service facility according to the method of "basic fitness + α-penalty fitness + β-profile fitness".
[0135] In this embodiment, a basic fitness function corresponding to the service facility is constructed, and the connectivity judgment result corresponding to the service facility is determined, so as to construct a connectivity penalty fitness function corresponding to the service facility based on the connectivity judgment result. Furthermore, by acquiring at least one business subgraph corresponding to a service facility, determining the node degree of at least one business subgraph, and constructing a contour fitness function corresponding to the service facility based on the node degree of at least one business subgraph, the basic fitness function, connectivity penalty fitness function, and contour fitness function can be weighted and fused to obtain the target fitness function corresponding to the service facility. This achieves comprehensive consideration from multiple different perspectives, including the perspective of the service facility's basic fitness function, such as the resource interaction total volume determination function, delivery business cost determination function, and rental cost determination function, as well as the connectivity penalty fitness function and contour fitness function. It can simultaneously consider the resource interaction volume, the connectivity between business blocks, and the contour shape of the delivery area composed of multiple business blocks, optimizing and adjusting the initial block allocation result to obtain the optimal business block allocation result for different service facilities. Thus, without changing the total business area of all service facilities, the business blocks of each service facility can be reallocated using the business block allocation result optimized by the target fitness function, overcoming the unreasonable block allocation during the initial allocation of service facilities and further improving the business processing efficiency of service facilities.
[0136] In one exemplary embodiment, such as Figure 4 As shown, the steps for obtaining at least one service sub-graph corresponding to a service facility specifically include steps S402 to S408. Wherein:
[0137] Step S402: From the solution vectors corresponding to the service facilities, determine at least one vector element whose element value meets the preset requirements.
[0138] Specifically, for each service facility, the solution vector corresponding to the service facility is obtained, and the initial solution vector corresponding to the service facility is transformed into a matrix to obtain the solution vector matrix corresponding to the initial solution vector. By traversing the solution vector matrix, at least one vector element whose element value meets the preset requirements is extracted from the solution vector matrix.
[0139] Specifically, determining whether an element's value meets a preset requirement can be understood as checking if the value of a vector element is 1. This can be understood as iterating through the solution vector matrix and extracting at least one vector element with a value of 1 from the matrix.
[0140] For example, if the solution vector X* of the i-th service facility ij=1, meaning when the j-th service block is assigned to the i-th service facility, X* is obtained by retrieving the i-th row of the solution vector matrix X*. i1 、X* i2 ... and X* in Given multiple vector elements, determine X*. i1 、X* i2 ... and X* in Whether the values of multiple vector elements meet preset requirements, i.e., determine X* i1 、X* i2 ... and X* in Check if the element values of multiple vectors are 1, and then set X*. i1 、X* i2 ... and X* in Extract the vector elements with a value of 1 from multiple vector elements and use them as vector elements whose element values meet the preset requirements.
[0141] Step S404: Obtain the block space adjacency matrix constructed for each business block, and construct the initial adjacency graph based on the block space adjacency matrix.
[0142] Specifically, by obtaining the block space adjacency matrix A constructed for the business blocks. ij An initial adjacency graph G is constructed based on the block space adjacency matrix. The initial adjacency graph G consists of n nodes, each representing a business block. Each edge in the initial adjacency graph G indicates that two business blocks are adjacent, for example, business block Bi and business block Bj are adjacent.
[0143] In an exemplary embodiment, for each of the multiple service blocks, the neighboring blocks adjacent to the current service block are determined by traversing all other service blocks, so as to establish a block space adjacency matrix A based on each service block and its corresponding neighboring blocks. n*n (n represents the existence of n business blocks).
[0144] Specifically, for each business block Bi, all other business blocks Bj are traversed, where j ≠ i, to determine whether business block Bi and business block Bj are adjacent. The adjacent relationship here includes, but is not limited to: the outlines of the two business blocks have an intersection point, or the overlap length of the outlines of the two business blocks exceeds a certain threshold.
[0145] Specifically, a block space adjacency matrix A is constructed based on each business block and its corresponding adjacent blocks. n*n If business block Bi and business block Bj satisfy the set adjacency relationship, then A ij It is 1 if it is true, otherwise it is 0. Where A... n*nIt is the symbolic representation of a matrix, indicating that its size is n*n, and A ij This represents the element in row i and column j of the matrix.
[0146] Step S406: Traverse the initial adjacency graph and determine the child nodes corresponding to at least one vector element.
[0147] Specifically, the initial adjacency graph G consists of n nodes, each representing a business block. By traversing the initial adjacency graph G, the child nodes corresponding to each of the at least one vector element can be determined from the initial adjacency graph G.
[0148] Step S408: Based on the child nodes corresponding to at least one vector element, construct at least one business subgraph corresponding to the service facility.
[0149] Specifically, after obtaining the child nodes corresponding to at least one vector element, at least one business subgraph SubG corresponding to the i-th service facility is constructed based on the at least one child node. i .
[0150] In this embodiment, at least one vector element whose value meets preset requirements is determined from the solution vectors corresponding to the service facility, and a block space adjacency matrix constructed for each business block is obtained. An initial adjacency graph is then constructed based on the block space adjacency matrix. Further, by traversing the initial adjacency graph, child nodes corresponding to at least one vector element can be determined. Based on these child nodes, at least one business subgraph corresponding to the service facility can be constructed. This achieves the extraction of child nodes corresponding to at least one vector element whose value meets preset requirements from the initial adjacency graph constructed from the block space adjacency matrix for each business block. This ensures that the business subgraph formed by the extracted child nodes meets connectivity requirements, preventing disconnections between the business block where the service facility is located and the business blocks that the service facility can deliver to, reducing delivery time, and further improving the business processing efficiency of the service facility.
[0151] In one exemplary embodiment, such as Figure 5 As shown, the steps for constructing the connectivity penalty fitness function corresponding to the service facility, namely determining the connectivity judgment result corresponding to the service facility and constructing the connectivity penalty fitness function corresponding to the service facility based on the connectivity judgment result, specifically include the following steps S502 to S508. Wherein:
[0152] Step S502: Determine the business block to which the service facility belongs based on the spatial mapping relationship between the service facility and its respective business block.
[0153] Specifically, for each of the multiple service facilities, each of the multiple business blocks is traversed to determine the business block to which the service facility belongs, and a spatial mapping relationship is established between each service facility and its respective business block.
[0154] For example, for each service facility S i Iterate through all business blocks B={ B1, B2, B3, …, Bn}, and determine whether the service facility Si is in the business block Bj. If the service facility Si is in the business block Bj, establish a mapping relationship Si:Bj and construct a mapping set SB={Si:Bj} to record the spatial mapping relationship between all service facilities and their respective business blocks.
[0155] Specifically, by obtaining the spatial mapping relationship between multiple service facilities and their respective business blocks, i.e., obtaining the pre-built mapping set SB={Si:Bj}, and based on the pre-built mapping set SB={Si:Bj}, obtaining the business block Bj to which the service facility Si belongs.
[0156] Step S504: If it is determined that the service facility belongs to a business block located in at least one business subgraph, then based on the service facility to which it belongs and each of the multiple business blocks, a connectivity judgment is performed to obtain the connectivity judgment result of the service facility for each business block.
[0157] Specifically, after obtaining the service block Bj to which the i-th service facility Si belongs, it is determined whether the service block Bj to which the i-th service facility Si belongs is located in at least one service subgraph SubG. i In the middle. Where the service block Bj to which the i-th service facility Si belongs is located in at least one service subgraph SubG i In the middle, based on the business block to which the service facility belongs, and each of the multiple business blocks, a connectivity judgment is made to obtain the connectivity judgment result of the service facility for each business block.
[0158] If it is determined that the business block to which the service facility belongs does not belong to at least one business subgraph, that is, if it is determined that there is a part of the delivery area of the service facility that is not connected to the business block to which the service facility belongs, then the obtained connectivity judgment result is determined to be that the business block of the i-th service facility does not satisfy connectivity, and the corresponding connectivity judgment result is N=-1.
[0159] Furthermore, when performing connectivity checks based on the service facility's business block and each of the multiple business blocks, the specific procedure may be to determine whether the service facility's business block and each of the multiple business blocks are reachable from each other. If it is determined that the service facility's business block is reachable from a certain business block, it indicates that the service facility's business block satisfies connectivity requirements. In this case, no further checks or modifications to the connectivity check result are needed.
[0160] For example, the accessibility between the service facility's business block and each of the multiple business blocks can be determined based on the adjacency relationship. For instance, if business block B1 and business block B2 are adjacent, and business block B2 and business block B3 are adjacent, then it can be determined that business block B1 and business block B3 are accessible to each other.
[0161] When determining whether a service facility is reachable from another service block, various traversal and shortest path algorithms can be used, including but not limited to: BFS (Breadth First Search), DFS (Depth First Search), Floyd (multi-source shortest path algorithm), and Dijkstra (single-source shortest path algorithm).
[0162] Step S506: Construct a connectivity penalty matrix based on the connectivity judgment results of the service facilities for each business block.
[0163] Specifically, after obtaining the connectivity assessment results for each service block from the service facility, a connectivity penalty matrix Neg is constructed for that service facility based on the connectivity assessment results for each service block. ij .
[0164] Step S508: Based on the connectivity penalty matrix, the solution vector, and the weight vector matrix preset for the service block, construct the connectivity penalty fitness function corresponding to the service facility.
[0165] Specifically, by obtaining the pre-defined weight vector matrix W for the business block. j And based on the constructed connectivity penalty matrix Neg ij Solution vector X* ij And the weight vector matrix W preset for the business blocks. j The connectivity penalty fitness function T corresponding to the service facility is obtained by fusion. ij .
[0166] Among them, W jIt can be set according to actual needs, including but not limited to all values being 1 or any real number, or set as the estimated resource interaction volume (BS) for each business block. i wait.
[0167] In this embodiment, the business block to which the service facility belongs is determined based on the spatial mapping relationship between the service facility and its respective business block. If the business block to which the service facility belongs is determined to be located in at least one business subgraph, then connectivity judgment is performed based on the business block to which the service facility belongs and each of the multiple business blocks to obtain the connectivity judgment result of the service facility for each business block. Further, based on the connectivity judgment result of the service facility for each business block, a connectivity penalty matrix is constructed, and based on the connectivity penalty matrix, the solution vector, and the preset weight vector matrix for the business block, a connectivity penalty fitness function corresponding to the service facility is constructed. This allows for the penalty of business blocks in the service facility's delivery area that are not connected to the service facility itself, thereby satisfying the connectivity requirements of the delivery area as much as possible, avoiding situations where the business block where the service facility is located and the business blocks that the service facility can deliver are not connected, reducing delivery time, and further improving the business processing efficiency of the service facility.
[0168] In one exemplary embodiment, such as Figure 6 As shown, the step of updating a portion of the solution vectors corresponding to each of the multiple service facilities—that is, when the individual fitness of multiple service facilities does not meet the preset business block allocation conditions, the step of updating a portion of the solution vectors corresponding to each of the multiple service facilities—specifically includes steps S602 to S606. Wherein:
[0169] Step S602: When the individual fitness of multiple service facilities does not meet the preset business block allocation conditions, determine the partial solution vectors with individual fitness greater than the preset threshold from the solution vectors corresponding to each of the multiple service facilities.
[0170] Specifically, by determining whether the individual fitness corresponding to multiple service facilities meets the preset business block allocation conditions, and when the individual fitness corresponding to multiple service facilities does not meet the preset business block allocation conditions, a preset threshold is obtained, and based on the preset threshold, the solution vectors with individual fitness greater than the preset threshold are determined from the solution vectors corresponding to each of the multiple service facilities.
[0171] The preset business block allocation conditions can specifically include: the individual fitness of multiple service facilities reaching a preset fitness threshold; the change in individual fitness of the same service facility before and after iteration being less than a preset change threshold; or the current iteration count for the same service facility reaching a preset number. The preset threshold, preset fitness threshold, preset change threshold, and preset number of iterations can be flexibly adjusted and set according to actual needs, and are not limited to a single or certain specific values.
[0172] Step S604: Perform cross processing on any two solution vectors in the partial solution vectors to obtain multiple solution vectors after cross processing.
[0173] Specifically, after determining the partial solution vectors whose individual fitness is greater than a preset threshold from the solution vectors corresponding to each of the multiple service facilities, cross processing is performed on any two solution vectors in the partial solution vectors, such as single-point cross, multi-point cross, or uniform cross, to obtain multiple solution vectors after cross processing.
[0174] For example, crossover refers to randomly selecting two individuals from the population and exchanging them to inherit the superior features of the parent string to the child string, thereby generating new superior individuals. To ensure that basic constraints are met before and after crossover, for a one-dimensional vector X, m vector components are grouped at intervals of n as the basic unit of crossover. For a matrix X*, each column is the basic unit of crossover. These basic constraints include: each service block can only be assigned to one service facility; one service facility can correspond to multiple service blocks; and one service facility must correspond to at least one service block.
[0175] Step S606: For each service facility, under the basic constraints that match the service facility, mutation processing is performed on multiple solution vectors after cross-processing to obtain an updated solution vector. The basic constraints include: each business block is assigned to only one service facility.
[0176] To prevent getting stuck in local optima during the optimization of the business block allocation scheme, individual blocks need to be mutated during the search process. This can be done using single-point mutation (or bit mutation), where only a single bit is mutated. During mutation processing, the basic constraint that each business block can only be allocated to one service facility must be maintained, ensuring that the sum of the columns containing the mutated bits remains 1.
[0177] Specifically, in this embodiment of the application, for the matrix form X*, it is selected by column, that is, each column in the matrix X* is a basic unit of intersection, which is to randomly mutate the allocation result of a certain business block to a certain service facility.
[0178] Furthermore, for each service facility, under the basic constraint of matching the service facility, that is, under the basic constraint that each business block can only be assigned to one service facility, mutation processing is performed on multiple solution vectors after cross-processing to obtain an updated solution vector.
[0179] For example, when randomly mutating the allocation result of a certain service block to a certain service facility, such as the j-th service block originally being allocated to the i-th service facility, and now mutating it to, for example, allocating the j-th service block to the k-th service facility, specifically, X* ij =1 mutates into X* ij =0, and set X* ik =0 mutates into X* ik =1. Similarly, for example, if the j-th service block was not originally assigned to the i-th service facility, and now it is modified to be assigned to the i-th service facility, then specifically X* ij =0 mutates into X* ij =1.
[0180] In an exemplary embodiment, the basic constraints include: 1) a first type of constraint on blocks, where each service block can only be assigned to one service facility; 2) a second type of constraint on service facilities, where one service facility can correspond to multiple service blocks, or one service facility can correspond to at least one service block, etc.
[0181] For example, "each business block can only be assigned to one service facility", the first type of constraint YS1 is represented by the following formula (11). :
[0182] Formula (11);
[0183] Where YS1 represents the first type of constraint, X* ij Let represent the solution vector of the i-th service facility, j represent the j-th business block, n represent the total number of n business blocks, and m represent the total number of m service facilities.
[0184] For example, according to the first type of constraint YS1, if there are m service facilities, for example, the first business block can only be assigned to one of the m service facilities, such as X*. 11 、X* 21 ...and X* m1 Summing them up yields a value of 1, which is X*. 11 、X* 21 ... and X* m1 Only one of them has a value of 1.
[0185] Similarly, taking "one service facility corresponds to at least one business block" as an example, the second type of constraint YS2 is represented by the following formula (12):
[0186] Formula (12);
[0187] Where YS2 represents the second type of constraint YS2, X* ij Let represent the solution vector of the i-th service facility, j represent the j-th business block, n represent the total number of n business blocks, i represent the i-th service facility, and m represent the total number of m service facilities.
[0188] For example, according to the second type of constraint YS2, if there are m service facilities and n blocks, and for example, the first service facility corresponds to at least one business block, then specifically for X* 11 、X* 12 ...and X* 1n Summing the values yields a value ≥ 1, i.e., X* 11 、X* 12 ...and X* 1n At least one of the vector elements has a value of 1, meaning there can be multiple vector elements with a value of 1.
[0189] In this embodiment, when the individual fitness of multiple service facilities does not meet the preset business block allocation conditions, some solution vectors with individual fitness greater than a preset threshold are determined from the solution vectors corresponding to each of the multiple service facilities. Cross-processing is then performed on any two solution vectors from these partial solution vectors to obtain multiple solution vectors after cross-processing. For each service facility, under the basic constraints matching the service facility, mutation processing is performed on the multiple solution vectors after cross-processing to obtain updated solution vectors. This allows for targeted further selection, cross-processing, and mutation processing of solution vectors for different service facilities. Through iterative iteration, the optimal business block allocation scheme is obtained. Based on the optimized business block allocation results, business block allocation processing can be performed on service facilities, overcoming the situation of unreasonable block allocation during the initial allocation of service facilities and further improving the business processing efficiency of service facilities.
[0190] In one exemplary embodiment, such as Figure 7 As shown, a method for allocating service blocks for a service facility is provided, including the following processing stages: P1 initialization, P2 calculating fitness, P3 determining whether the fitness meets the service block allocation conditions, P4 updating the solution vector if the fitness does not meet the service block allocation conditions (including filtering some solution vectors, crossover processing, and mutation processing), P5 obtaining the target solution vector if the fitness meets the service block allocation conditions, and P6 decoding the target solution vector to obtain the service block allocation result. Wherein:
[0191] P1. Initialization:
[0192] Specifically, the existing block allocation results of multiple service facilities are initialized, or random initialization is performed on multiple service facilities and multiple business blocks to obtain the solution vectors corresponding to each of the multiple service facilities.
[0193] Based on the business planning requirements corresponding to each service facility, i.e., the required business block allocation scheme is to allocate n business blocks to m service facilities (such as convenience stores, supermarkets, and restaurants), we can pre-assume that the solution vector of the service facilities is a one-dimensional vector of length m*n, denoted as X. If X is transformed into an m*n matrix, filled with rows first and then columns, it is denoted as X*, X*... ij ∈{0,1}, where X ij =1 indicates that the j-th service block is assigned to the i-th service facility, X ij =0 means that the j-th business block was not assigned to the i-th service facility.
[0194] P2. Calculate fitness, including: 1) Spatial relationship resolution; 2) Constructing basic constraints; 3) Constructing basic fitness functions; 4) Constructing connectivity penalty fitness functions; 5) Constructing contour fitness functions; 6) Constructing target fitness functions; 7) Determining the individual fitness corresponding to the service facility. Wherein:
[0195] 1) Spatial Relationship Analysis:
[0196] There are m service facilities S={ S1, S2, S3, Si, ..., Sm} and n pre-divided business blocks B={ B1, B2, B3, Bj, ..., Bn}.
[0197] A. Spatial mapping relationship: For each service facility Si, traverse all business blocks B={ B1, B2, B3, …, Bn}, determine whether the service facility Si is in the business block Bj. If the service facility Si is in the business block Bj, establish the mapping relationship Si:Bj and construct the mapping set SB={Si:Bj} to record the spatial mapping relationship between all service facilities and their respective business blocks.
[0198] B. Block Spatial Adjacency Matrix: For each business block Bi, traverse all other business blocks Bj, where j ≠ i, and determine whether business block Bi and business block Bj are adjacent. Adjacency relationships include, but are not limited to: the outlines of the two business blocks intersect, or the overlap length of the outlines of the two business blocks exceeds a certain threshold. Based on each business block and its corresponding adjacent blocks, a block spatial adjacency matrix A is constructed.n*n If business block Bi and business block Bj satisfy the set adjacency relationship, then A ij It is 1 if it is true, otherwise it is 0.
[0199] C. Spatial Distance Matrix: For each service facility Si, traverse all business blocks Bj and calculate the spatial distance between the i-th service facility and the j-th business block. Specifically, a spatial distance matrix is pre-established for the spatial distance between each service facility and each business block. Among them, D ij The element in the i-th row and j-th column of the distance matrix represents the spatial distance between the i-th service facility and the j-th business block.
[0200] 2) Constructing basic constraints: Basic constraints include: 1) First type, constraints on blocks, each business block can only be assigned to one service facility; 2) Second type, constraints on service facilities, one service facility can correspond to multiple business blocks, or one service facility can correspond to at least one business block, etc.
[0201] 3) Construct the basic fitness function AS i Basic fitness function AS i =Resource Interaction Total Determination Function SS i - Delivery business cost determination function C i - Rental cost determination function R i (SS) i ,Y)
[0202] A. Construct a function SS to determine the total amount of resource interaction. i First, for each service facility, the local service resource interaction volume FS corresponding to the service facility is obtained. i For example, sales figures for convenience stores, supermarkets, and restaurants, and the estimated periodic resource interaction volume (BS) corresponding to at least one business block matching the service facilities. j For example, the estimated sales revenue for at least one business block (including annual, quarterly, and monthly estimated sales revenue); secondly, for each business block in at least one business block, obtain the spatial distance matrix between the business block and the service facility, and determine the spatial distance D between the business block and the service facility from the spatial distance matrix. ij To estimate the amount of resource interaction based on the cycle (BS) j and spatial distance D ij Construct the distance decay function FD(BS) corresponding to the business block. j D ij Third, for the i-th service facility, based on the local service resource interaction volume FS corresponding to the i-th service facility... iThe estimated periodic resource interaction volume (BS) of the j-th business block j For the distance decay function FD(BS) corresponding to the j-th service block j D ij ), and the solution vector X* ij Construct a function SS to determine the total amount of resource interaction corresponding to the i-th service facility. i .
[0203] B. Constructing a function to determine the cost of delivery operations C i First, for each service facility, obtain the estimated periodic order volume (BO) corresponding to at least one business block that matches the service facility. j For example, the estimated annual order volume, quarterly order volume, or monthly order volume for at least one business block; secondly, based on the spatial distance between the service facility and at least one business block, construct a function c(D) to determine the delivery unit price of the service facility for the business block. ij Third, for the i-th service facility, the solution vector X* corresponding to the i-th service facility... ij Delivery unit price determination function c(D) ij ), and the estimated periodic order volume (BO) corresponding to at least one business block matching the service facilities. j By integrating these components, a delivery service cost determination function C corresponding to the i-th service facility is constructed. i .
[0204] C. Constructing the rental cost determination function R i (SS) i (Y): First, when determining the rental cost determination function corresponding to the service facilities, set R... i First, the rental cost of the i-th service facility is represented. Second, the rental logic relationship pre-set for the i-th service facility is obtained, so as to obtain the rental cost determination function R corresponding to the i-th service facility based on the rental logic relationship. i (SS) i ,Y).
[0205] 4) Construct the connectivity penalty fitness function T ij Based on the existing basic fitness function, construct a connectivity penalty fitness function T corresponding to the service facility. ij To address the issue of service facilities' delivery areas being disconnected from the service facilities themselves, penalties are imposed on certain business blocks within the delivery area in order to meet the connectivity requirements of the delivery area as much as possible.
[0206] Specifically, if the i-th service facility can deliver to the j-th business block, i.e., X* ij =1 The connectivity judgment result for the i-th service facility is further determined, specifically whether the business blocks of the i-th service facility itself (e.g., the i-th business block) and the business blocks requiring delivery (e.g., the j-th business block) satisfy connectivity requirements. If the connectivity judgment result for the i-th service facility is that connectivity is not satisfied, then the corresponding connectivity judgment result is N=-1.
[0207] Furthermore, after obtaining the connectivity assessment results for each service block from the service facility, a connectivity penalty matrix Neg is constructed for that service facility based on the connectivity assessment results for each service block. ij Furthermore, based on the constructed connectivity penalty matrix Neg ij Solution vector X* ij And the weight vector matrix W preset for the business blocks. j The connectivity penalty fitness function T corresponding to the service facility is obtained by fusion. ij .
[0208] 5) Construct the contour fitness function L i : By obtaining at least one business subgraph corresponding to the service facility, and for each business subgraph in the at least one business subgraph, obtaining the number of edges of each node in each business subgraph, and determining the node degree corresponding to the business subgraph based on the number of edges of each node in each business subgraph. i To determine the degree of nodes in at least one business subgraph. i Sum of solution vectors X* ij Construct the contour fitness function L corresponding to the service facilities. i .
[0209] 6) Construct the target fitness function P ij By obtaining the basic fitness function AS i Connectivity penalty fitness function T ij and the contour fitness function L i Each has its own pre-set weights, and the basic fitness function AS is adjusted according to these pre-set weights. i Connectivity penalty fitness function T ij and the contour fitness function L i We perform weighted fusion to obtain the target fitness function P corresponding to the service facilities. ij .
[0210] 7) Determine the individual fitness corresponding to the service facility: First, for each service facility, determine at least one business block that matches the service facility based on the solution vector of the service facility, and determine the business attribute information corresponding to the service facility based on at least one business block; Second, obtain the target fitness function corresponding to the service facility, and determine the individual fitness corresponding to the service facility based on the target fitness function and the business attribute information.
[0211] The business attribute information corresponding to the service facility includes the periodic estimated resource interaction volume, periodic estimated order volume, and spatial distance between the service facility and at least one business block that matches the service facility.
[0212] P3. Determine if the fitness meets the business block allocation conditions: Determine whether the individual fitness corresponding to multiple service facilities meets the preset business block allocation conditions.
[0213] Specifically, if the fitness of individuals corresponding to multiple service facilities does not meet the preset business block allocation conditions, then jump to P4 (update the solution vector if the fitness does not meet the business block allocation conditions) to update a portion of the solution vectors corresponding to each of the multiple service facilities. If the fitness of individuals corresponding to multiple service facilities meets the preset business block allocation conditions, then jump to P5 (obtain the target solution vector if the fitness meets the business block allocation conditions).
[0214] The preset business block allocation conditions may specifically be that the individual fitness of multiple service facilities reaches a preset fitness threshold, or the change in the individual fitness of the same service facility before and after iteration is less than a preset change threshold, or the current iteration number for the same service facility reaches a preset number.
[0215] P4. If the fitness does not meet the business block allocation conditions, then update the solution vector:
[0216] First, when the individual fitness of multiple service facilities does not meet the preset business block allocation conditions, some solution vectors with individual fitness greater than a preset threshold are determined from the solution vectors corresponding to each of the multiple service facilities. Second, cross-processing is performed on any two solution vectors in the partial solution vectors to obtain multiple solution vectors after cross-processing. Third, for each service facility, under the basic constraint that each business block is only allocated to one service facility, mutation processing is performed on the multiple solution vectors after cross-processing to obtain updated solution vectors.
[0217] P5. If the fitness satisfies the business block allocation condition, then the target solution vector is obtained:
[0218] Specifically, if the individual fitness of multiple service facilities meets the preset business block allocation conditions, then the solution vector corresponding to each service facility when the preset business block allocation conditions are met is determined as the target solution vector corresponding to each service facility.
[0219] P6. Decode the target solution vector to obtain the service block allocation result:
[0220] Specifically, the allocation results of business blocks corresponding to each of the multiple service facilities are determined based on the target solution vectors corresponding to each of the multiple service facilities.
[0221] In the above-mentioned service facility business block allocation method, by obtaining the solution vectors of the block allocation results used by each of the multiple service facilities to represent the service facility, for each service facility, at least one business block matching the service facility is determined based on the solution vector of the service facility, and based on at least one business block, the business attribute information corresponding to the service facility is determined. Thus, from the perspective of the target fitness function corresponding to the service facility, combined with the business attribute information of the service facility, a comprehensive fitness calculation of the service facility can be performed, accurately obtaining the individual fitness corresponding to the service facility, and reducing the omission of business attribute information. Specifically, when the individual fitness of multiple service facilities does not meet the preset business block allocation conditions, a portion of the solution vectors corresponding to each service facility are updated, and the process jumps to the step of determining at least one business block matching the service facility based on its solution vector. This process continues until the individual fitness of multiple service facilities meets the preset business block allocation conditions, resulting in target solution vectors for each service facility. This allows for the initial block allocation results of the service facilities to be evaluated from the perspective of their individual fitness. When it is determined that the individual fitness of multiple service facilities meets the preset business block allocation conditions, the updating of the solution vectors and the evaluation of individual fitness for the service facilities are stopped, resulting in optimized target solution vectors for the service facilities. Furthermore, based on the target solution vectors corresponding to each service facility, the business block allocation results for each service facility are determined. Subsequently, business block allocation processing can be performed on the service facilities based on the optimized business block allocation results, overcoming the situation of unreasonable block allocation during the initial allocation of service facilities and further improving the business processing efficiency of the service facilities.
[0222] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0223] Based on the same inventive concept, this application also provides a service facility business block allocation apparatus for implementing the service facility business block allocation method described above. The solution provided by this apparatus is similar to the implementation described in the above method. Therefore, the specific limitations in one or more service facility business block allocation apparatus embodiments provided below can be found in the limitations of the service facility business block allocation method described above, and will not be repeated here.
[0224] In one exemplary embodiment, such as Figure 8 As shown, a service facility business block allocation device is provided, including: a solution vector acquisition module 802, a business attribute information determination module 804, an individual fitness determination module 806, a solution vector update module 808, a target solution vector acquisition module 810, and a business block allocation result acquisition module 812, wherein:
[0225] The solution vector acquisition module 802 is used to acquire the solution vectors corresponding to each of the multiple service facilities; the solution vectors represent the block allocation results of the service facilities.
[0226] The business attribute information determination module 804 is used to determine at least one business block that matches the service facility based on the solution vector of the service facility for each service facility, and to determine the business attribute information corresponding to the service facility based on at least one business block.
[0227] The individual fitness determination module 806 is used to obtain the target fitness function corresponding to the service facility, and determine the individual fitness corresponding to the service facility based on the target fitness function and business attribute information.
[0228] The solution vector update module 808 is used to update a portion of the solution vectors corresponding to each of the multiple service facilities when the individual fitness of multiple service facilities does not meet the preset business block allocation conditions.
[0229] The target solution vector acquisition module 810 is used to jump to the step of determining at least one business block that matches the service facility based on the solution vector of the service facility for each service facility, until the individual fitness of multiple service facilities meets the preset business block allocation conditions, and obtain the target solution vector corresponding to each of the multiple service facilities.
[0230] The business block allocation result acquisition module 812 is used to determine the business block allocation result corresponding to each of the multiple service facilities based on the target solution vectors corresponding to each of the multiple service facilities.
[0231] In the aforementioned service facility business block allocation device, by acquiring the solution vectors of the block allocation results used by multiple service facilities to characterize the service facility, for each service facility, at least one business block matching the service facility is determined based on the solution vector of the service facility, and based on at least one business block, the business attribute information corresponding to the service facility is determined. Thus, from the perspective of the target fitness function corresponding to the service facility, combined with the business attribute information of the service facility, a comprehensive fitness calculation of the service facility can be performed, accurately obtaining the individual fitness corresponding to the service facility, and reducing the omission of business attribute information. Specifically, when the individual fitness of multiple service facilities does not meet the preset business block allocation conditions, a portion of the solution vectors corresponding to each service facility are updated, and the process jumps to the step of determining at least one business block matching the service facility based on its solution vector. This process continues until the individual fitness of multiple service facilities meets the preset business block allocation conditions, resulting in target solution vectors for each service facility. This allows for the initial block allocation results of the service facilities to be evaluated from the perspective of their individual fitness. When it is determined that the individual fitness of multiple service facilities meets the preset business block allocation conditions, the updating of the solution vectors and the evaluation of individual fitness for the service facilities are stopped, resulting in optimized target solution vectors for the service facilities. Furthermore, based on the target solution vectors corresponding to each service facility, the business block allocation results for each service facility are determined. Subsequently, business block allocation processing can be performed on the service facilities based on the optimized business block allocation results, overcoming the situation of unreasonable block allocation during the initial allocation of service facilities and further improving the business processing efficiency of the service facilities.
[0232] In one exemplary embodiment, a service facility business block allocation apparatus is provided, further comprising a target fitness function acquisition module, for:
[0233] Construct a basic fitness function corresponding to the service facility and determine the connectivity judgment result corresponding to the service facility. Based on the connectivity judgment result, construct a connectivity penalty fitness function corresponding to the service facility. Obtain at least one business subgraph corresponding to the service facility, determine the node degree of at least one business subgraph, and construct a contour fitness function corresponding to the service facility based on the node degree of at least one business subgraph. Perform weighted fusion of the basic fitness function, the connectivity penalty fitness function, and the contour fitness function to obtain the target fitness function corresponding to the service facility.
[0234] In an exemplary embodiment, the target fitness function acquisition module is further configured to: determine the resource interaction total amount determination function, the delivery business cost determination function, and the rental cost determination function corresponding to the service facility; and fuse the resource interaction total amount determination function, the delivery business cost determination function, and the rental cost determination function according to the basic fitness function calculation method to obtain the basic fitness function corresponding to the service facility.
[0235] In an exemplary embodiment, the target fitness function acquisition module is further configured to: acquire the local service resource interaction volume corresponding to the service facility, and acquire the periodically estimated resource interaction volume corresponding to at least one business block matching the service facility; for each business block in the at least one business block, acquire the spatial distance matrix between the business block and the service facility, determine the spatial distance between the business block and the service facility, and construct a distance decay function corresponding to the business block based on the periodically estimated resource interaction volume and the spatial distance; and construct a resource interaction total determination function corresponding to the service facility based on the local service resource interaction volume, the periodically estimated resource interaction volume, the distance decay function, and the solution vector.
[0236] In an exemplary embodiment, the target fitness function acquisition module is further configured to: obtain the estimated order volume for the period corresponding to at least one business block that matches the service facility; construct a delivery unit price determination function based on the spatial distance between the service facility and at least one business block; and construct a delivery business cost determination function corresponding to the service facility based on the solution vector, the delivery unit price determination function, and the estimated order volume for the period.
[0237] In an exemplary embodiment, the target fitness function acquisition module is further configured to: determine at least one vector element whose element value meets preset requirements from the solution vectors corresponding to the service facility; obtain the block space adjacency matrix constructed for each business block, and construct an initial adjacency graph based on the block space adjacency matrix; traverse the initial adjacency graph to determine the child node corresponding to at least one vector element; and construct at least one business subgraph corresponding to the service facility based on the child node corresponding to at least one vector element.
[0238] In an exemplary embodiment, the target fitness function obtaining module is further configured to: determine the business block to which the service facility belongs based on the spatial mapping relationship between the service facility and its respective business block; if the business block to which the service facility belongs is determined to be located in at least one business subgraph, then perform connectivity judgment based on the business block to which the service facility belongs and each of the multiple business blocks to obtain the connectivity judgment result of the service facility for each business block; construct a connectivity penalty matrix based on the connectivity judgment result of the service facility for each business block; and construct a connectivity penalty fitness function corresponding to the service facility based on the connectivity penalty matrix, the solution vector, and the weight vector matrix preset for the business block.
[0239] In an exemplary embodiment, the target fitness function acquisition module is further configured to: for each business subgraph in at least one business subgraph, obtain the number of edges of each node in each business subgraph, and determine the node degree corresponding to the business subgraph based on the number of edges of each node in each business subgraph; and construct a contour fitness function corresponding to the service facility based on the node degree and solution vector of at least one business subgraph.
[0240] In an exemplary embodiment, the solution vector update module is further configured to: when the individual fitness corresponding to multiple service facilities does not meet the preset business block allocation conditions, determine a portion of the solution vectors whose individual fitness is greater than a preset threshold from the solution vectors corresponding to each of the multiple service facilities; perform cross processing on any two solution vectors in the portion of the solution vectors to obtain multiple solution vectors after cross processing; for each service facility, under the basic constraints matching the service facility, perform mutation processing on the multiple solution vectors after cross processing to obtain an updated solution vector; the basic constraints include: each business block is allocated to only one service facility.
[0241] In an exemplary embodiment, the business attribute information determination module is further configured to: decode the solution vector corresponding to each service facility to obtain the initial block allocation result corresponding to the service facility; parse the initial block allocation result to obtain at least one business block matching each service facility.
[0242] Each module in the business block allocation device of the aforementioned service facilities can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0243] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal. Taking the computer device as a server as an example, the internal structure diagram of the computer can be as follows. Figure 9 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data such as solution vectors characterizing the block allocation results of service facilities, at least one service block matching the service facility, service attribute information, target fitness function, individual fitness, preset service block allocation conditions, target solution vectors, and service block allocation results. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a service facility service block allocation method.
[0244] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0245] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0246] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0247] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0248] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0249] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0250] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0251] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for allocating business blocks for service facilities, characterized in that, The method includes: Obtain the solution vectors corresponding to each of the multiple service facilities; the solution vectors represent the block allocation results of the service facilities; For each of the service facilities, at least one business block matching the service facility is determined based on the solution vector of the service facility, and business attribute information corresponding to the service facility is determined based on the at least one business block. Obtain the target fitness function corresponding to the service facility, and determine the individual fitness corresponding to the service facility based on the target fitness function and the business attribute information; When the individual fitness corresponding to the multiple service facilities does not meet the preset business block allocation conditions, a portion of the solution vectors corresponding to each of the multiple service facilities is updated; Jump to the step of determining at least one business block matching the service facility based on the solution vector of the service facility for each service facility, until the individual fitness corresponding to the multiple service facilities meets the preset business block allocation conditions, and obtain the target solution vector corresponding to each of the multiple service facilities; Based on the target solution vectors corresponding to each of the multiple service facilities, the allocation results of the business blocks corresponding to each of the multiple service facilities are determined.
2. The method according to claim 1, characterized in that, The process of obtaining the target fitness function corresponding to the service facility includes: Construct a basic fitness function corresponding to the service facility, determine the connectivity judgment result corresponding to the service facility, and construct a connectivity penalty fitness function corresponding to the service facility based on the connectivity judgment result; Obtain at least one business subgraph corresponding to the service facility, determine the node degree of the at least one business subgraph, and construct a contour fitness function corresponding to the service facility based on the node degree of the at least one business subgraph. The basic fitness function, the connectivity penalty fitness function, and the contour fitness function are weighted and fused to obtain the target fitness function corresponding to the service facility.
3. The method according to claim 2, characterized in that, The construction of the basic fitness function corresponding to the service facility includes: Determine the function for determining the total amount of resource interaction, the function for determining the delivery business cost, and the function for determining the rental cost corresponding to the service facilities; According to the basic fitness function calculation method, the resource interaction total determination function, the delivery business cost determination function, and the rental cost determination function are fused to obtain the basic fitness function corresponding to the service facility.
4. The method according to claim 3, characterized in that, The function for determining the total amount of resource interaction corresponding to the service facility is constructed in the following way: Obtain the local service resource interaction volume corresponding to the service facility, and obtain the periodic estimated resource interaction volume corresponding to at least one business block matching the service facility; For each of the at least one service blocks, obtain the spatial distance matrix between the service block and the service facility, determine the spatial distance between the service block and the service facility, and construct a distance decay function corresponding to the service block based on the periodic estimated resource interaction volume and the spatial distance. Based on the local service resource interaction volume, the periodically estimated resource interaction volume, the distance decay function, and the solution vector, a function for determining the total resource interaction volume corresponding to the service facility is constructed.
5. The method according to claim 3, characterized in that, The cost determination function for the delivery service corresponding to the aforementioned service facility is constructed in the following manner: Obtain the estimated order volume for the period corresponding to at least one business block that matches the service facility; A delivery unit price determination function is constructed based on the spatial distance between the service facilities and the at least one business block; Based on the solution vector, the delivery unit price determination function, and the periodic estimated order volume, a delivery business cost determination function corresponding to the service facility is constructed.
6. The method according to any one of claims 2 to 5, characterized in that, The step of obtaining at least one business sub-graph corresponding to the service facility includes: From the solution vectors corresponding to the service facilities, at least one vector element whose element value meets the preset requirements is determined; Obtain the block space adjacency matrix constructed for each business block, and construct an initial adjacency graph based on the block space adjacency matrix; Traverse the initial adjacency graph to determine the child nodes corresponding to the at least one vector element; Based on the child nodes corresponding to the at least one vector element, construct at least one business subgraph corresponding to the service facility.
7. The method according to any one of claims 2 to 5, characterized in that, The step of determining the connectivity judgment result corresponding to the service facility, and constructing a connectivity penalty fitness function corresponding to the service facility based on the connectivity judgment result, includes: The business block to which the service facility belongs is determined based on the spatial mapping relationship between the service facility and its respective business block; If it is determined that the service facility belongs to a business block located in the at least one business subgraph, then based on the service facility to which it belongs and each of the multiple business blocks, a connectivity judgment is performed to obtain the connectivity judgment result of the service facility for each of the business blocks. Based on the connectivity judgment results of the service facilities for each of the business blocks, a connectivity penalty matrix is constructed; Based on the connectivity penalty matrix, the solution vector, and the weight vector matrix preset for the service block, a connectivity penalty fitness function corresponding to the service facility is constructed.
8. The method according to any one of claims 2 to 5, characterized in that, Determine the node degree of the at least one business subgraph, and construct a contour fitness function corresponding to the service facility based on the node degree of the at least one business subgraph, including: For each business subgraph in the at least one business subgraph, the number of edges of each node in each business subgraph is obtained, and the node degree corresponding to the business subgraph is determined based on the number of edges of each node in each business subgraph. Based on the node degree of the at least one business subgraph and the solution vector, a contour fitness function corresponding to the service facility is constructed.
9. The method according to any one of claims 1 to 5, characterized in that, When the fitness of the individual service facilities does not meet the preset business block allocation conditions, a portion of the solution vectors corresponding to each of the multiple service facilities is updated, including: When the individual fitness corresponding to the multiple service facilities does not meet the preset business block allocation conditions, the partial solution vectors with individual fitness greater than the preset threshold are determined from the solution vectors corresponding to the multiple service facilities. By performing cross processing on any two of the partial solution vectors, multiple solution vectors are obtained after cross processing; For each of the service facilities, under the basic constraints that match the service facility, a mutation process is performed on multiple solution vectors after cross-processing to obtain an updated solution vector; the basic constraints include: each of the service blocks is assigned to only one service facility.
10. The method according to any one of claims 1 to 5, characterized in that, The step of determining at least one service block matching each service facility based on the solution vector corresponding to each service facility includes: Decode the solution vector corresponding to each service facility to obtain the initial block allocation result corresponding to the service facility; The initial block allocation result is parsed to obtain at least one business block that matches each of the service facilities.
11. A service facility business block allocation device, characterized in that, The device includes: The solution vector acquisition module is used to acquire the solution vectors corresponding to each of the multiple service facilities; the solution vectors represent the block allocation results of the service facilities. The business attribute information determination module is used to determine, for each service facility, at least one business block matching the service facility based on the solution vector of the service facility, and to determine the business attribute information corresponding to the service facility based on the at least one business block; An individual fitness determination module is used to obtain a target fitness function corresponding to the service facility, and determine the individual fitness corresponding to the service facility based on the target fitness function and the business attribute information. The solution vector update module is used to update a portion of the solution vectors corresponding to each of the multiple service facilities when the individual fitness corresponding to the multiple service facilities does not meet the preset business block allocation conditions. The target solution vector acquisition module is used to jump to the step of determining at least one business block that matches each service facility based on the solution vector of the service facility, until the individual fitness corresponding to the multiple service facilities meets the preset business block allocation conditions, and obtain the target solution vector corresponding to each of the multiple service facilities. The business block allocation result acquisition module is used to determine the business block allocation result corresponding to each of the multiple service facilities based on the target solution vector corresponding to each of the multiple service facilities.
12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.
