Sorting method and related device
Through multi-objective optimization algorithm and population optimization technology, the problem of low accuracy of manual sorting is solved, and the optimal sorting is achieved in the case of conflicting objective functions, improving the accuracy and efficiency of sorting.
Patent Information
- Application Number
- CN202411608968.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-21
AI Technical Summary
When conducting organization or product sorting analysis, the existing technology relies on manual experience, resulting in low sorting accuracy, especially when the objective functions conflict with each other, it is difficult to find the optimal solution.
Using a multi-objective optimization algorithm, a population of a parent set including a random sorting combination of objects to be processed is constructed. By generating a child set, sequential adjustment and sorting operations, the optimal processing is realized, and iterated gradually to select the optimal set.
The ordering accuracy of objective functions is improved in scenarios where the objective function conflicts, and the sorting results of the pending objects can be determined more accurately than manual experience-based methods.
Smart Images

Figure CN119493816A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and in particular to a sorting method and related devices. Background Art
[0002] As the company continues to grow, it opens more and more institutions or launches more and more products. For more institutions or products, it is necessary to analyze them according to the company's needs in order to sort the data.
[0003] Currently, when ranking and analyzing institutions or products, they are manually ranked and analyzed based on experience, which has low accuracy. Summary of the invention
[0004] In view of the above problems, the present application provides a sorting method and related devices to achieve the purpose of improving the sorting accuracy of institutions or products. The specific scheme is as follows:
[0005] The first aspect of the present application provides a sorting method, comprising:
[0006] According to the attribute information of the object to be processed for sorting operation, the objective function corresponding to the object to be processed is determined; the number of the objective functions is multiple and the multiple objective functions conflict with each other; the objective function includes a first type function and a second type function, the first type function is calculated based on the first type income and the second type income; the second type function is calculated based on the first type expenditure and the second type expenditure;
[0007] Performing data preprocessing and standardization operations on the historical data of the object to be processed to obtain target data;
[0008] Calculating the function value of the objective function corresponding to the object to be processed by using the target data of the object to be processed;
[0009] Constructing a first population whose size is a first value and whose individual length is a second value; wherein the second value is the total number of objects to be processed, each parent set in the first population is a randomly sorted combination of the objects to be processed, and in the parent set, the weight of the object to be processed is related to the position of the object to be processed in the parent set;
[0010] For each of the parent sets, based on the function value of the objective function corresponding to the object to be processed in the parent set and the weight of the object to be processed, calculate the function value of the objective function corresponding to the parent set;
[0011] Generate a child set corresponding to the parent set, form the parent set and the child set into a second population, and perform a sequence adjustment operation on each set in the second population to obtain a third population;
[0012] Sorting the sets in the third population to obtain a first sorting result, and based on the first sorting result, screening out sets whose number is the first value from the third population to obtain a new first population, returning to execute the step of calculating the function value of the objective function corresponding to the parent set based on the function value of the objective function corresponding to the object to be processed in the parent set and the weight of the object to be processed for each parent set, and executing sequentially until the number of iterations reaches a preset number, and stopping to obtain a target population;
[0013] Based on the function value of the objective function of the set in the target population, performing a sorting operation on the set in the target population to obtain a second sorting result;
[0014] Based on the second sorting result, a target set is screened out from the target population, and the target set is sorted based on a difference in function values of the target functions corresponding to the target set to obtain a third sorting result;
[0015] The target set at the first position in the third sorting result is screened out, and the sorting order of each to-be-processed object in the screened target set is used as the sorting result of the to-be-processed object.
[0016] In a possible implementation, generating a child set corresponding to the parent set includes:
[0017] Randomly select two parent sets from the first population as the first parent set and the second parent set respectively;
[0018] Put multiple elements in the first parent set into the first child set, and insert the remaining elements in the first parent set into the first child set according to the order of the corresponding elements in the second parent set;
[0019] Put multiple elements in the second parent set into the second child set, and insert the remaining elements in the second parent set into the second child set according to the order of the corresponding elements in the first parent set;
[0020] The selected parent set is deleted from the first population, and the step of randomly selecting two parent sets from the first population is returned to be executed sequentially until the parent set in the first population is empty, thereby obtaining a plurality of first child sets and a plurality of second child sets;
[0021] The plurality of first child sets and the plurality of second child sets are combined to obtain a child set.
[0022] In a possible implementation, a sequence adjustment operation is performed on each set in the second population to obtain a third population, including:
[0023] Randomly select multiple locations;
[0024] For each set in the second population, the elements at the position are reordered to obtain a third population.
[0025] In a possible implementation, performing a sorting operation on the sets in the third population to obtain a first sorting result includes:
[0026] Calculating a function value of the objective function of each set in the third cluster;
[0027] Based on the function value of the objective function of each set in the third cluster, the sets in the third cluster are sorted to obtain a first sorting result; the first sorting result includes a plurality of frontier surfaces arranged in sequence; the frontier surface includes at least one set.
[0028] In a possible implementation, based on the first sorting result, selecting a set whose number is the first value from the third population to obtain a new first population includes:
[0029] Based on the first sorting result, determining whether the number of sets in the first frontier surface is greater than the first value;
[0030] If not, determining whether the sum of the number of sets in the first frontier surface and the number of sets in the second frontier surface is greater than the first value;
[0031] If the sum is greater than the first value, calculating the difference between the first value and the number of sets in the first frontier surface to obtain a third value;
[0032] Based on the crowding distance, selecting sets with a third value from the sets in the second frontier surface;
[0033] The set in the first frontier surface and the set screened from the second frontier surface are combined to obtain a new first population.
[0034] In a possible implementation, based on the second sorting result, screening out a target set from the target population includes:
[0035] Based on the second sorting result, a set located on the first frontier in the target population is screened out to obtain a target set.
[0036] A second aspect of the present application provides a sorting device, comprising:
[0037] A function determination module, used for determining the objective function corresponding to the object to be processed according to the attribute information of the object to be processed for sorting operation; the number of the objective functions is multiple and the multiple objective functions conflict with each other; the objective function includes a first type function and a second type function, the first type function is calculated based on the first type income and the second type income; the second type function is calculated based on the first type expenditure and the second type expenditure;
[0038] A data processing module is used to perform data preprocessing and standardization operations on the historical data of the object to be processed to obtain target data;
[0039] A first function value calculation module, used to calculate the function value of the objective function corresponding to the object to be processed by using the target data of the object to be processed;
[0040] A population construction module, used to construct a first population whose size is a first value and whose individual length is a second value; wherein the second value is the total number of objects to be processed, each parent set in the first population is a randomly sorted combination of the objects to be processed, and in the parent set, the weight of the object to be processed is related to the position of the object to be processed in the parent set;
[0041] A second function value calculation module, configured to calculate, for each parent set, a function value of the objective function corresponding to the parent set based on the function value of the objective function corresponding to the object to be processed in the parent set and the weight of the object to be processed;
[0042] A first population adjustment module is used to generate a child set corresponding to the parent set, form the parent set and the child set into a second population, and perform a sequential adjustment operation on each set in the second population to obtain a third population;
[0043] a second population adjustment module, configured to perform a sorting operation on the sets in the third population to obtain a first sorting result, and to screen out sets whose number is the first value from the third population based on the first sorting result to obtain a new first population;
[0044] A judging module, used to judge whether the number of iterations is a preset number;
[0045] The second function value calculation module is further configured to calculate, for each parent set, the function value of the objective function corresponding to the object to be processed in the parent set and the weight of the object to be processed, if the judgment module determines that the number of iterations is not the preset number;
[0046] A first sorting processing module is used to obtain a target population when the judgment module determines that the number of iterations is a preset number, and to sort the sets in the target population based on the function value of the objective function of the sets in the target population to obtain a second sorting result;
[0047] A second sorting processing module is used to screen out a target set from the target population based on the second sorting result, and sort the target set based on the difference of the function value of the target function corresponding to the target set to obtain a third sorting result;
[0048] The result determination module is used to filter out the target set that is at the first place in the third sorting result, and use the sorting order of each to-be-processed object in the filtered target set as the sorting result of the to-be-processed object.
[0049] A third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the above-mentioned sorting method.
[0050] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0051] The memory is used to store computer programs;
[0052] The processor is used to execute the computer program so that the electronic device can implement the above-mentioned sorting method.
[0053] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the above-mentioned sorting method.
[0054] By means of the above technical scheme, the present application provides a sorting method and related devices. In the present application, when sorting institutions or products, if the corresponding objective functions conflict with each other, in order to determine the sorting result better, a parent set including a random sorting combination of the objects to be processed will be constructed, and the parent set will be formed into a population. Based on the parent set in the population, a child set is generated, the order of the set is adjusted, and the sorting operation is performed. These multiple steps realize the preferential treatment of the random sorting combination of the objects to be processed. After multiple iterations, the optimal set can be selected, and the sorting result of the objects to be processed is finally determined, achieving the purpose of determining the optimal sorting in the scenario where the objective functions conflict with each other. Compared with the manual experience-based method, the accuracy of the sorting determination can be improved due to multiple iterations of preferential treatment. In addition, in the present invention, when determining the objective function corresponding to the object to be processed, the attribute information of the object to be processed to be sorted will be referred to, so that the matching degree of the set objective function and the object to be processed is higher, and the accuracy of the objective function setting is improved. In addition, in the present invention, during the final sorting, the target set is sorted based on the difference in function values of the objective functions corresponding to the target set to obtain a third sorting result, so that the function value of the objective function of the screened objects to be processed is optimal, thereby improving the accuracy of screening the objects to be processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0056] Figure 1 A schematic diagram of a system architecture provided for this application;
[0057] Figure 2 A schematic diagram of a terminal structure provided for this application;
[0058] Figure 3 A schematic diagram of a server structure provided for this application;
[0059] Figure 4 A flowchart of a sorting method provided for this application;
[0060] Figure 5 A flowchart of a method for determining a progeny set provided in this application;
[0061] Figure 6 A schematic diagram of the structure of a sorting device provided in this application;
[0062] Figure 7 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0063] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0064] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0065] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0066] 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, stored data, displayed data, 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 relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0067] As the company continues to grow, it opens more and more institutions or launches more and more products. For more institutions or products, it is necessary to analyze them according to the company's needs in order to sort the data.
[0068] At present, when ranking and analyzing institutions or products, they are manually ranked and analyzed based on experience. Taking institutions as an example, when ranking institutions, the contribution of institutions will be considered. Taking profit contribution as an example, profit contribution is a measurement indicator for performance indicator assessment. The business, expenditure and profit involved in the assessment period of local branches or sub-branches are multi-dimensional. How to formulate reasonable assessment methods and measurement indicators is a problem that all major banks are concerned about. The existing profit contribution calculation method is usually to manually calculate various interest income, business expenditure and other indicators based on a certain dimension. The analysis report can only show the results of various indicators, and cannot get the overall ranking of institutions, so it is impossible to directly obtain the assessment results from it. To obtain the final performance ranking, a large amount of data analysis is required, which is time-consuming, labor-intensive, and low in accuracy. Moreover, expenditure and profit are two conflicting goals, and manual sorting cannot find the optimal solution for both.
[0069] When sorting products, we also sort the products according to their dimensions, such as sales volume, expenditure and other indicators. To get the final ranking, we need to go through a lot of data analysis, which is time-consuming, laborious and has low accuracy. Moreover, expenditure and profit are two conflicting goals, and manual sorting cannot find the optimal solution for both.
[0070] To this end, in the embodiment of the present invention, a multi-objective optimization algorithm is used to perform the optimization operation of conflicting objectives. The multi-objective optimization algorithm is an optimization algorithm that is good at solving problems with conflicting objectives. In many fields, there is a common problem that multiple objectives cannot be optimally achieved at the same time. For example, when purchasing products, people's needs are low price and good performance, but low price and good performance are two conflicting objectives. At this time, the multi-objective optimization algorithm can be used to optimize these two objective functions at the same time, thereby finding the optimal solution. The multi-objective optimization algorithm mainly includes steps such as population initialization, crossover mutation, mating pool selection, and finding the Pareto optimal solution set. By setting a suitable evolutionary algebra and corresponding parameters, the optimal solution set of the problem to be optimized can be obtained.
[0071] In the embodiment of the present invention, a multi-objective optimization algorithm is applied to the ranking of products and organizations. Compared with the manual ranking method, it can better solve the optimization problem under conflicting objectives, has higher accuracy, and saves time and effort.
[0072] Specifically, the present application provides a sorting method and related devices. In the present application, when sorting institutions or products, if the corresponding objective functions conflict with each other, in order to better determine the sorting result, a parent set including a random sorting combination of the objects to be processed will be constructed, and the parent set will be formed into a population. Based on the parent set in the population, a child set is generated, the order of the set is adjusted, and the sorting operation is performed. These multiple steps realize the preferential treatment of the random sorting combination of the objects to be processed. After multiple iterations, the optimal set can be selected, and the sorting result of the objects to be processed is finally determined, achieving the purpose of determining the optimal sorting in the scenario where the objective functions conflict with each other. Compared with the manual experience-based method, the accuracy of the sorting determination can be improved due to multiple iterations of preferential treatment. In addition, in the present invention, when determining the objective function corresponding to the object to be processed, the attribute information of the object to be processed to be sorted will be referred to, so that the matching degree of the set objective function and the object to be processed is higher, and the accuracy of the objective function setting is improved. In addition, in the present invention, during the final sorting, the target set is sorted based on the difference in function values of the objective functions corresponding to the target set to obtain a third sorting result, so that the function value of the objective function of the screened objects to be processed is optimal, thereby improving the accuracy of screening the objects to be processed.
[0073] The sorting method and related devices provided by the present invention can be used in the financial field or other fields, for example, can be used in sorting application scenarios in the financial field. Other fields are any fields other than the financial field, for example, the data processing field. The above is only an example and does not limit the application field of the sorting method and related devices provided by the present invention.
[0074] See also Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers ( Figure 1 In the example, a server is included, and the server 200 can provide the method provided in the embodiment of the present application for one or more terminals.
[0075] The terminal 100 may push relevant parameters to the server 200 , and the server 200 may obtain processing results based on the received parameters and return the processing results to the terminal 100 .
[0076] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters by itself without the cooperation of the server, and the embodiments of the present application are not limited to this.
[0077] Next describe Figure 1 The product form of the mid-terminal 100;
[0078] The terminal 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiment of the present application does not impose any limitation on this.
[0079] Figure 2 An optional hardware structure diagram of the terminal 100 is shown.
[0080] refer to Figure 2 As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), an earphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190 and other components. Those skilled in the art will appreciate that Figure 2 These are merely examples of terminals or multi-function devices and do not constitute limitations on the terminals or multi-function devices, which may include more or fewer components than those shown in the figures, or combinations of certain components, or different components.
[0081] The input unit 130 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the portable multifunctional device. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect the user's touch operations on or near it (such as the user's operation on or near the touch screen using any suitable object such as fingers, joints, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch screen can detect the user's touch action on the touch screen, convert the touch action into a touch signal and send it to the processor 170, and can receive and execute the command sent by the processor 170; the touch signal at least includes the touch point coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, the touch screen can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.
[0082] Among them, the input device 132 can receive input data and the like.
[0083] The display unit 140 may be used to display information input by the user or provided to the user, various menus of the terminal 100, interactive interfaces, file display and / or playback of any multimedia file. In the embodiment of the present application, the display unit 140 may be used to display a sorting interface, processing results, etc.
[0084] The memory 120 can be used to store instructions and data. The memory 120 can mainly include an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files, texts, etc.; the instruction storage area can store software units such as operating systems, applications, instructions required for at least one function, or their subsets and extensions. It can also include a non-volatile random access memory; provide the processor 170 with hardware, software and data resources including management of computing and processing equipment, and support control software and applications. It is also used for the storage of multimedia files, and the storage of running programs and applications.
[0085] The processor 170 is the control center of the terminal 100. It uses various interfaces and lines to connect various parts of the entire terminal 100. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it executes various functions of the terminal 100 and processes data, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 170. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips. The processor 170 may also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that each functional module therein performs corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.
[0086] Among them, the memory 120 can be used to store software codes related to the sorting method, the processor 170 can execute the steps of the sorting method, and can also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to achieve corresponding functions.
[0087] The radio frequency unit 110 (optional) can be used for receiving and sending information or receiving and sending signals during a call, for example, after receiving the downlink information of the base station, it is sent to the processor 170 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0088] In this embodiment of the present application, the RF unit 110 can send data to the server 200 and receive processing results sent by the server 200.
[0089] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.
[0090] The terminal 100 also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.
[0091] The terminal 100 further includes an external interface 180 , which may be a standard Micro USB interface or a multi-pin connector, and may be used to connect the terminal 100 to communicate with other devices, or to connect a charger to charge the terminal 100 .
[0092] Although not shown, the terminal 100 may also include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which are not described in detail here. Some or all of the methods described below may be applied in the following embodiments. Figure 2 In the terminal 100 shown.
[0093] Next describe Figure 1 The product form of the server 200;
[0094] Figure 3 A structural diagram of a server 200 is provided, such as Figure 3 As shown, the server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.
[0095] The bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0096] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0097] The memory 204 may include a volatile memory, such as a random access memory (RAM). The memory 204 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard drive (HDD), or a solid state drive (SSD).
[0098] The memory 204 may be used to store software codes related to the sorting method, and the processor 202 may execute the steps of the chip sorting method and may also schedule other units to implement corresponding functions.
[0099] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the processors in the above-mentioned terminal 100 and server 200 (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.
[0100] In order to solve the above problems, the present application provides a sorting method. The sorting method of the present application is described in detail below with reference to the accompanying drawings.
[0101] Reference Figure 4 , Figure 4 A flow chart of a sorting method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, a sorting method provided in an embodiment of the present application may include:
[0102] S11. Determine the objective function corresponding to the object to be processed according to the attribute information of the object to be processed.
[0103] The objective function includes a first type function and a second type function, the first type function is calculated based on the first type income and the second type income; the second type function is calculated based on the first type expenditure and the second type expenditure.
[0104] In practical applications, the object to be processed is the target of the sorting operation, such as various organizations in a company or all products produced by a company. The product can be a physical product, such as shopping bags, commemorative coins, etc., or a virtual product, such as funds, stocks, etc.
[0105] Taking an institution as an example, the institution has corresponding historical data. Historical data refers to all the data that the institution has currently generated, such as data involving multiple dimensions such as products, customers, and accounts. Among them, the customer dimension can include data such as the number of customers, customer distribution areas, customer purchase volume, and income brought by customers. The account dimension can be the data of fund accounts, stock accounts, deposit accounts, etc., and the product can be the data of virtual products or physical products.
[0106] In order to sort the organizations, it is necessary to set a corresponding objective function. In this embodiment, there are multiple objective functions and the multiple objective functions conflict with each other. The objective function and the data of the dimensions required to calculate the objective function can be configured according to actual conditions.
[0107] When determining the objective function, it is necessary to refer to the attribute information of the object to be processed, such as the object name, object sorting requirements, object domain, etc.
[0108] When determining the objective function specifically, it can be determined manually based on experience, or the attribute information can be input into a large model to output an objective function that conforms to the object to be sorted. It can also be obtained through statistical analysis, such as performing statistical analysis operations on the attribute information to obtain the main focus of the object to be sorted, and then constructing an objective function corresponding to the main focus.
[0109] Specifically, taking the contribution degree based on the institution, such as profit contribution degree, as an example, when setting the objective function, more attention is paid to income and expenditure, and four indicators are selected: first type of income (such as interest income), second type of input (such as non-interest income), first type of expenditure (such as interest expenditure), and second type of expenditure (such as non-interest expenditure), forming two objective functions: income item = first type of income + second type of input, and expenditure item = first type of expenditure + second type of expenditure, where the income item is a first type of function and the expenditure item is a second type of function. In the case of maximizing the objective function, income and expenditure are contradictory, which is suitable for multi-objective optimization algorithms. In actual application scenarios, multiple conflicting objective functions can also be set according to the needs of the institution or product.
[0110] After the objective function is determined, for each institution, the function value of the objective function of the institution is calculated based on the historical data of the institution, that is, the values of the income items and expenditure items of each institution are determined.
[0111] S12: performing data preprocessing and standardization operations on the historical data of the object to be processed to obtain target data.
[0112] Specifically, in order to ensure the accuracy of the basic data for calculating the function value, in an embodiment of the present invention, data preprocessing operations are performed on the historical data. The data preprocessing can be operations such as data cleaning, data screening, data filling, and elimination of erroneous values.
[0113] After the data preprocessing is completed, in order to avoid the problem of subsequent calculation errors caused by the data sizes of different data types, in the embodiment of the present invention, the data after data preprocessing will be standardized to obtain target data.
[0114] S13. Calculate the function value of the objective function corresponding to the object to be processed by using the target data of the object to be processed.
[0115] Specifically, by substituting the target input into the above-mentioned calculation formulas for the income items and expenditure items, the numerical values of the income items and the expenditure items can be obtained.
[0116] S14, constructing a first population whose size is a first value and whose individual length is a second value.
[0117] When using a multi-objective optimization algorithm to solve the problem of conflicting target selection, it is necessary to construct a population. In this embodiment, the size of the first population constructed is a first value, and the first value N can be obtained according to the actual scenario requirements, such as 100, and the second value n is the total number of objects to be processed. Taking a total of 10 institutions as an example, n is 10, then in the embodiment of the present invention, when the population is initialized, assuming that the total number of institutions or products to be assessed is n, a population including N individuals and an individual length of n can be randomly constructed, which is called the first population, and each individual in the first population is called a parent individual, which can be specifically a parent set, and each parent set in the first population is a randomly sorted combination of the objects to be processed. For example, if there are 10 institutions, and the institutions are institution 1, institution 2, institution 3, ... institution 10, then one parent set can include 1, 2, 3 ... 10, another parent set can include 3, 2, 1 ... 10, and another parent set can include 4, 2, 1 ... 10, that is, each parent set includes the institution numbers of 10 institutions, but in each parent set, the arrangement order of the 10 institutions is different, that is, the position of each institution in the parent set is different. That is, the code of each individual in the population is a random arrangement of 1, 2, 3, 4 ... n.
[0118] In practical applications, the weight of the object to be processed in the parent set is related to the position of the object to be processed in the parent set. The weight of each object to be processed in each individual is 1 / 2 1 , 1 / 2 2 , 1 / 2 3 ……1 / 2 n , where n is the code value of the corresponding value position.
[0119] S15. For each of the parent sets, based on the function value of the objective function corresponding to the object to be processed in the parent set and the weight of the object to be processed, calculate the function value of the objective function corresponding to the parent set.
[0120] Specifically, after the population is initialized, the value of each individual, that is, each parent set, needs to be determined. In the embodiment of the present invention, for a parent set, the function value of the objective function of each mechanism in it has been calculated, and the function value and weight of the objective function of the mechanism can be used for weighted summation.
[0121] Take a parent generation set as an example, which includes 4, 2, 1...10, then the function value of the income item of the parent generation set is:
[0122] Income item of institution 4 × 1 / 2 1 + Income item of institution 2 × 1 / 2 2 + Income item of institution 1 × 1 / 2 3 +……+income item of institution 10×1 / 2 n .
[0123] The function value of the expenditure item of the parent set is:
[0124] Expenditure item of institution 4 × 1 / 2 1 +Expenditures of Institution 2×1 / 2 2 +Expenditures of Institution 1×1 / 2 3 +……+Expenditures of institution 10×1 / 2 n .
[0125] Through the above steps, the income item value and expenditure item value of each individual in the population, that is, each parent set, can be obtained.
[0126] S16. Generate a child set corresponding to the parent set, form the parent set and the child set into a second population, and perform a sequence adjustment operation on each set in the second population to obtain a third population.
[0127] In this embodiment, after determining the income item value and the expenditure item value of each parent set in the first population, a crossover operation is performed to generate offspring individuals, specifically offspring sets. In this embodiment, a sequence-based crossover method is used to perform a crossover operation to obtain offspring sets. The parent set is N, and the individuals of the generated offspring set are also N. After executing the crossover operator, a total of 2N individuals are obtained in the parent set and the offspring set.
[0128] The population initialization and crossover mutation operators in this embodiment have great randomness, which is helpful to generate a diverse population, and the use of non-dominated sorting is more conducive to finding the optimal solution set.
[0129] The parent set and the child set can form a second population, and then a sequence adjustment operation is performed on each set in the second population to generate variant individuals, and the generated variant individuals are combined to obtain a third population.
[0130] When performing the specific order adjustment, multiple positions may be randomly selected, such as selecting the third, fourth and fifth positions for each set in the second population, and then reordering the elements at the positions for each set in the second population to obtain the third population.
[0131] For example, traverse each set in the second population, randomly select s positions as subsequences, randomly rearrange and insert the subsequences, for example, individual p = (1, 2, 3, 4, 5), select the subsequence (2, 3, 4), rearrange it to (4, 2, 3), and insert it back into p to obtain the mutated individual p' = (1, 4, 2, 3, 5). All p's form the third population, and the number of individuals in the third population is 2N.
[0132] S17: performing a sorting operation on the sets in the third population to obtain a first sorting result, and based on the first sorting result, screening out sets whose number is the first value from the third population to obtain a new first population.
[0133] In an embodiment of the present invention, when performing a sorting operation on the sets in the third population R, the sorting can be based on the function value of the objective function of the set, that is, the income item and the expenditure item. Then, it is first necessary to calculate the function value of the objective function of each set in the third cluster, and the function value calculation process is the same as the above-mentioned calculation process of the parent set.
[0134] Then, based on the function value of the objective function of each set in the third cluster, the sets in the third cluster are sorted to obtain a first sorting result. Specifically, when sorting, the population R can be sorted by non-dominated sorting. The non-dominated sorting is used to determine the dominance relationship between individuals in the population. Through the non-dominated sorting, the individuals in the population can be divided into different levels, and the individuals in each level are non-dominated, that is, they are not dominated by other individuals.
[0135] Non-dominated sorting usually includes the following steps:
[0136] 1. Initialization: First, put all individuals in the population into an unsorted set.
[0137] 2. First round of sorting: select all non-dominated individuals from the set to form a new set, and remove these individuals from the original set.
[0138] 3. Subsequent sorting: Repeat the above process for the remaining individuals until all individuals are sorted.
[0139] Through non-dominated sorting, the non-dominated level of each individual can be determined, so as to better select and retain excellent individuals during the evolution process.
[0140] The sorting result obtained after sorting is called the first sorting result. The first sorting result includes multiple frontier surfaces arranged in sequence. The frontier surface includes at least one set. For example, in this sorting result, there are five frontier surfaces, the first frontier surface includes 80 sets, the second frontier surface includes 30 sets, the third frontier surface includes 10 sets, the fourth frontier surface includes 50 sets, and the fifth frontier surface includes 30 sets. The higher the frontier surface is ranked, the better the sets in it are, such as the sets in the first frontier surface are better than the sets in the second frontier surface.
[0141] After obtaining the first sorting result, based on the first sorting result, a set with the first value is selected from the third population to obtain a new first population. When selecting, the first N individuals can be selected according to the frontier sorting and crowding distance to form the next iteration population.
[0142] Specifically, based on the first sorting result, determine whether the number of sets in the first frontier surface is greater than the first value. Taking the five frontier surfaces in this sorting result as an example, the first frontier surface includes 80 sets, the second frontier surface includes 30 sets, the third frontier surface includes 10 sets, the fourth frontier surface includes 50 sets, and the fifth frontier surface includes 30 sets.
[0143] Since the first frontier surface includes 80 sets, and 80 is less than N (100), it is determined whether the sum of the number of sets in the first frontier surface and the number of sets in the second frontier surface is greater than the first value. In this embodiment, 80+30=110 is greater than N, so all sets in the first frontier surface are screened out, and some sets in the second frontier surface are screened out to form a new first population.
[0144] When partially screening the sets of the second frontier surface, the difference between the first value and the number of sets in the first frontier surface is calculated to obtain a third value. In this embodiment, 100-80=20 is calculated, that is, 20 sets need to be screened out from the second frontier surface. At this time, based on the crowding distance, sets with a third value, such as 20, can be screened out from the sets in the second frontier surface.
[0145] Crowding distance can help evaluate the diversity and distribution of solutions, thereby helping to select the optimal solution. The calculation method of crowding distance is determined by measuring the density of solutions in the target space. Specifically, for each solution, we calculate the distance between it and its neighboring solutions and add up these distances as the value of crowding distance. The definition of neighboring solutions can be adjusted according to the specific problem. Common methods include Euclidean distance and Manhattan distance.
[0146] The advantage of crowding distance is that it can help evaluate the diversity and distribution of solutions. Through crowding distance, solutions with more uniform distribution and higher diversity can be identified, thus helping to select the optimal solution. In addition, crowding distance can also be used to solve the convergence problem in multi-objective optimization and prevent the algorithm from falling into the local optimal solution too early.
[0147] In this embodiment, after selecting 20 sets from the 30 sets in the second frontier surface based on the crowding distance, the sets in the first frontier surface and the sets selected from the second frontier surface are combined to obtain a new first population. That is, in this embodiment, 20 sets selected from the 30 sets in the second frontier surface and 80 sets in the first frontier surface are combined to form 100 sets, and these 100 sets are the new first population.
[0148] It should be noted that if the sum of the number of sets in the first frontier surface and the number of sets in the second frontier surface is still not greater than the first value, then continue to calculate the sum of the number of sets of the first frontier surface, the second frontier surface and the third frontier surface, and judge it with the first value until it is greater than the first value, then start the set screening operation to obtain the final new first population.
[0149] In this embodiment, N individuals are selected to form the population for the next iteration based on the frontier sorting and the crowding distance, so that the optimal solution can be selected and the algorithm can be prevented from falling into the local optimal solution too early.
[0150] S18. Determine whether the number of iterations is the preset number; if so, execute step S19.
[0151] In practical applications, when using a multi-objective optimization algorithm, the number of iterations is generally set, and the number of iterations can be configured according to the actual scenario. If the number of iterations is reached, the step of selecting the optimal set in step S19 can be executed. If the number of iterations is not reached, the next iteration is continued, and step S15 is returned to and repeated until the number of iterations reaches the preset number, and step S19 is started.
[0152] S19: Obtain a target population, and perform a sorting operation on the sets in the target population based on the function value of the target function of the sets in the target population to obtain a second sorting result.
[0153] In this embodiment, when selecting the optimal set, the non-dominated sorting algorithm can still be used to sort the combinations in the target population, and the optimal set is selected based on the sorting result. The optimal set includes the order of each object to be processed, such as each mechanism, and this order is the sorting result of the object to be processed.
[0154] Specifically, the preset t iterations are completed to obtain a final target population, and a sorting operation is performed on the sets in the target population to obtain a second sorting result, wherein the second sorting result includes a plurality of frontier surfaces arranged in sequence, and the frontier surface includes at least one set.
[0155] It should be noted that this sorting still uses the non-dominated sorting algorithm, and the specific implementation refers to the corresponding instructions above.
[0156] S110. Based on the second sorting result, a target set is screened out from the target population, and the target set is sorted based on the difference in function values of the target functions corresponding to the target set to obtain a third sorting result.
[0157] Specifically, based on the second sorting result, the set located on the first frontier surface in the target population is screened out to obtain the target set. Specifically, in the second sorting result, the set in the first frontier surface is the optimal solution set. In this embodiment, the set located in the first frontier surface is screened out as the target set. By decoding the individuals in the optimal solution set in the first frontier surface, the optimal set for institutional assessment can be obtained.
[0158] The number of target sets in the first frontier may be one or more. If there is only one, the order of the objects to be processed in the target set is the sorting result of the objects to be processed. If there are more than one, the optimal target set needs to be selected from the multiple target sets. At this time, based on the difference in the function value of the objective function of each target set, the target sets are sorted according to the income item-expenditure item to obtain the third sorting result. In the third sorting result, the larger the value of the income item-expenditure item, the higher the ranking, and the smaller the value of the income item-expenditure item, the lower the ranking.
[0159] S111 , filtering out the target set that is at the first position in the third sorting result, and using the sorting order of each to-be-processed object in the filtered target set as the sorting result of the to-be-processed object.
[0160] In this embodiment, a target set of max[income - expenditure] is selected, which is the screened target set and is taken as the optimal set. The sorting order of each object to be processed in the set is the sorting result of the object to be processed.
[0161] If the optimal set is (10,4,3,1,5,6,7,8,9,2), then the order of the 10 institutions is institution 10, institution 4, institution 3, institution 1...institution 2.
[0162] In this embodiment, when ranking institutions or products, if the corresponding objective functions conflict with each other, in order to better determine the ranking result, a parent set including a randomly sorted combination of objects to be processed will be constructed, and the parent set will be formed into a population. Based on the parent set in the population, a child set is generated, the order of the set is adjusted, and the sorting operation is performed. These multiple steps realize the preferential processing of the randomly sorted combination of objects to be processed. After multiple iterations, the optimal set can be selected, and finally the ranking result of the objects to be processed is determined, thereby achieving the purpose of determining the optimal ranking in the scenario where the objective functions conflict with each other. Compared with the manual experience-based method, the accuracy of the ranking determination can be improved due to multiple iterative preferential processing.
[0163] In addition, in the present invention, when determining the objective function corresponding to the object to be processed, the attribute information of the object to be processed to be sorted is referred to, so that the set objective function has a higher matching degree with the object to be processed, and the accuracy of the objective function setting is improved. In addition, in the present invention, in the final sorting, the target set is sorted based on the difference in the function value of the objective function corresponding to the target set, and a third sorting result is obtained, so that the function value of the objective function of the screened object to be processed is optimal, and the obtained sorting result is related to the actual sorting scenario, which improves the accuracy of the screening of the object to be processed.
[0164] Another embodiment of the present invention provides a specific implementation of generating a child set corresponding to the parent set, referring to Figure 5 , which may include:
[0165] S21. Randomly select two parent sets from the first population as the first parent set and the second parent set respectively.
[0166] In this embodiment, for the N individuals in the first population, two individuals are randomly selected each time, that is, two parent sets are selected, which are recorded as the first parent set P1 and the second parent set P2.
[0167] S22. Put multiple elements in the first parent set into the first child set, and insert the remaining elements in the first parent set into the first child set according to the order of the corresponding elements in the second parent set.
[0168] Specifically, m elements from the first parent set P1 are randomly selected and put into the first child set q1, and the remaining elements are inserted into q1 according to the original order of P2.
[0169] For example, P1 is (1,2,3,4,5,6,7,8,9,10) and P2 is (10,4,3,1,5,6,7,8,9,2). The randomly selected elements from P1 are 1, 5, and 10 and put into the first child set q1 (1,,, 5,,,,, 10). The order of the remaining elements in P2 is 4, 3, 6, 7, 8, 9, 2. Inserting them into q1 yields (1, 4, 3, 6, 5, 7, 8, 9, 2, 10).
[0170] S23. Put multiple elements in the second parent set into the second child set, and insert the remaining elements in the second parent set into the second child set according to the order of the corresponding elements in the first parent set.
[0171] Specifically, for P2, first randomly select m elements from P2 and put them into the second child set q2, and then insert the remaining elements into q2 according to the original order of P1 to obtain the final q2.
[0172] S24. Deleting the selected parent set from the first population.
[0173] After completing the crossover operator operation on the above-mentioned first parent set and second parent set, these two sets are deleted from the first population.
[0174] S25. Determine whether the parent set in the first population is empty; if it is empty, execute step S26.
[0175] If it is not empty, return to step S21 and continue to select two parent sets to perform crossover operator operations until all parent sets are processed, that is, stop when the parent set in the first population is empty, and then execute step S26.
[0176] S26. Obtain a plurality of first offspring sets and a plurality of second offspring sets, and combine the plurality of first offspring sets and the plurality of second offspring sets to obtain an offspring set.
[0177] Specifically, through the above-mentioned multiple crossover operator operations, multiple first offspring sets q1 and second offspring sets q2 are obtained, and the above-mentioned operations are repeated until all individuals in the mating pool are selected, and the crossover operator operation is completed, and the multiple first offspring sets and the multiple second offspring sets are combined to obtain an offspring set.
[0178] In this embodiment, the offspring set is generated based on the sequential crossover method. The sequential crossover method is relatively simple, easy to implement, and does not require complex calculations and operations. In addition, the sequential crossover is more effective than other crossover methods and can better handle order-related problems. In addition, the sequential crossover can maintain the order of the offspring in the parent generation.
[0179] In another embodiment of the present invention, the specific implementation of the present invention is introduced by taking the profit contribution of an organization as an example. Specifically, based on the calculation of the profit contribution index, a multi-objective optimization algorithm is used to establish a performance appraisal ranking model (i.e., a model including the above method). First, the research object is the profit contribution index of each dimension calculated by the profit contribution analysis system, which can be the net profit contribution of the customer dimension, or the net profit contribution of the product dimension. The net profit contribution value is summarized from multiple dimensions by the data of the institutions participating in the performance appraisal, and the optimal set is obtained by the multi-objective optimization algorithm. The institutions in the optimal set are sorted according to specific indicators, and a clear performance ranking can be obtained. This method can effectively solve the problem of not being able to obtain direct appraisal results, effectively improve the efficiency of performance appraisal work, and maximize the use value of the profit contribution index.
[0180] In this embodiment, a multi-objective optimization algorithm is used to initialize the population according to the number of entities to be evaluated, and the final performance evaluation optimal set is obtained by executing t update iterations, and ranking is performed according to the optimal solution.
[0181] A sorting method provided by an embodiment of the present application is introduced above, and a device for executing the above sorting method will be introduced below.
[0182] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of a sorting device provided in an embodiment of the present application. Figure 6 As shown, the sorting device comprises:
[0183] A function determination module 11 is used to determine the objective function corresponding to the object to be processed according to the attribute information of the object to be processed for sorting operation; the number of the objective functions is multiple and the multiple objective functions conflict with each other; the objective function includes a first type function and a second type function, the first type function is calculated based on the first type income and the second type income; the second type function is calculated based on the first type expenditure and the second type expenditure;
[0184] The data processing module 12 is used to perform data preprocessing and standardization operations on the historical data of the object to be processed to obtain target data;
[0185] A first function value calculation module 13, used to calculate the function value of the target function corresponding to the object to be processed by using the target data of the object to be processed;
[0186] A population construction module 14 is used to construct a first population whose size is a first value and whose individual length is a second value; wherein the second value is the total number of objects to be processed, each parent set in the first population is a randomly sorted combination of the objects to be processed, and in the parent set, the weight of the object to be processed is related to the position of the object to be processed in the parent set;
[0187] A second function value calculation module 15 is used to calculate, for each parent set, the function value of the objective function corresponding to the parent set based on the function value of the objective function corresponding to the object to be processed in the parent set and the weight of the object to be processed;
[0188] A first population adjustment module 16 is used to generate a child set corresponding to the parent set, form the parent set and the child set into a second population, and perform a sequential adjustment operation on each set in the second population to obtain a third population;
[0189] The second population adjustment module 17 is used to perform a sorting operation on the sets in the third population to obtain a first sorting result, and to screen out sets whose number is the first value from the third population based on the first sorting result to obtain a new first population;
[0190] A judging module 18 is used to judge whether the number of iterations is a preset number;
[0191] The second function value calculation module 15 is further configured to calculate the function value of the objective function corresponding to the parent set based on the function value of the objective function corresponding to the object to be processed in the parent set and the weight of the object to be processed for each parent set when the judgment module judges that the number of iterations is not the preset number;
[0192] A first sorting processing module 19 is used to obtain a target population when the judgment module determines that the number of iterations is a preset number, and to sort the sets in the target population based on the function value of the objective function of the sets in the target population to obtain a second sorting result;
[0193] A second sorting processing module 110 is used to screen a target set from the target population based on the second sorting result, and sort the target set based on the difference in function values of the target functions corresponding to the target set to obtain a third sorting result;
[0194] The result determination module 111 is used to filter out the target set that is at the first place in the third sorting result, and use the sorting order of each to-be-processed object in the filtered target set as the sorting result of the to-be-processed object.
[0195] In a possible implementation, the first population adjustment module 16 includes:
[0196] A set selection submodule, used for randomly selecting two parent sets from the first population as a first parent set and a second parent set respectively;
[0197] A first offspring generation submodule, configured to place multiple elements in the first parent set into a first offspring set, and insert the remaining elements in the first parent set into the first offspring set in the order of the corresponding elements in the second parent set;
[0198] A second offspring generation submodule, configured to place multiple elements in the second parent set into a second offspring set, and insert the remaining elements in the second parent set into the second offspring set in the order of the corresponding elements in the first parent set;
[0199] A set deletion submodule, used to delete the selected parent set from the first population;
[0200] A judging submodule, used to judge whether the parent set in the first population is empty;
[0201] The set selection submodule is further configured to randomly select two parent sets from the first population when the judgment submodule determines that the parent set in the first population is not empty;
[0202] The set determination submodule is used to obtain multiple first offspring sets and multiple second offspring sets when the judgment submodule determines that the parent set in the first population is empty, and combine the multiple first offspring sets and the multiple second offspring sets to obtain an offspring set.
[0203] In a possible implementation, the first population adjustment module 16 includes:
[0204] The position selection submodule is used to randomly select multiple positions;
[0205] The first sorting submodule is used to re-sort the elements at the position for each set in the second population to obtain a third population.
[0206] In a possible implementation, the second population adjustment module 17 includes:
[0207] a function value calculation submodule, configured to calculate a function value of an objective function of each set in the third cluster based on the first sorting result;
[0208] A second sorting submodule is used to sort the sets in the third cluster based on the function value of the objective function of each set in the third cluster to obtain a first sorting result; the first sorting result includes a plurality of frontier surfaces arranged in sequence; the frontier surface includes at least one set; and the sorting result includes the first sorting result.
[0209] In a possible implementation, the second population adjustment module 17 includes:
[0210] A first quantity determination submodule, used to determine whether the number of sets in the first frontier surface is greater than the first value;
[0211] A second quantity determination submodule, if not greater than, determines whether the sum of the number of sets in the first frontier surface and the number of sets in the second frontier surface is greater than the first value;
[0212] a difference calculation submodule, configured to calculate the difference between the first value and the number of sets in the first frontier surface to obtain a third value if the sum is greater than the first value;
[0213] A set screening submodule, configured to screen sets having a third value from the sets in the second frontier surface based on the crowding distance;
[0214] The set combination submodule is used to combine the sets in the first frontier surface and the sets screened from the second frontier surface to obtain a new first population.
[0215] In a possible implementation, the second sorting processing module 110 includes:
[0216] The set processing submodule is used to filter out the set located on the first frontier in the target population based on the second sorting result to obtain a target set.
[0217] In this embodiment, when the institutions or products are sorted, if the corresponding objective functions conflict with each other, in order to determine the sorting result better, a parent set including the random sorting combination of the objects to be processed will be constructed, and the parent set will be formed into a population. Based on the parent set in the population, a child set is generated, the order of the set is adjusted, and the sorting operation is performed. These multiple steps realize the preferential treatment of the random sorting combination of the objects to be processed. After multiple iterations, the optimal set can be selected, and the sorting result of the objects to be processed is finally determined, achieving the purpose of determining the optimal sorting in the scenario where the objective functions conflict with each other. Compared with the manual experience-based method, the accuracy of the sorting determination can be improved due to the multiple iterations of preferential treatment. In addition, in the present invention, when determining the objective function corresponding to the object to be processed, the attribute information of the object to be processed to be sorted will be referred to, so that the matching degree between the set objective function and the object to be processed is higher, and the accuracy of the objective function setting is improved. In addition, in the present invention, during the final sorting, the target set is sorted based on the difference in function values of the objective functions corresponding to the target set to obtain a third sorting result, so that the function value of the objective function of the screened objects to be processed is optimal, thereby improving the accuracy of screening the objects to be processed.
[0218] It should be noted that, for the working process of each module and sub-module in this embodiment, please refer to the corresponding description in the above embodiment, which will not be repeated here.
[0219] An embodiment of the present application also provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0220] The memory is used to store computer programs;
[0221] The processor is used to execute the computer program so that the electronic device can implement the above-mentioned sorting method.
[0222] refer to Figure 7 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic device in the embodiments of the present application may include but is not limited to fixed terminals such as mobile phones, notebook computers, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 7 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0223] like Figure 7As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0224] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0225] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any one of the sorting methods provided in the embodiments of the present application.
[0226] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the sorting methods provided in the embodiments of the present application.
[0227] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0228] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0229] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0230] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A sorting method, characterized in that: include: Determining the objective function corresponding to the object to be processed according to the attribute information of the object to be processed; The number of the objective functions is multiple and the multiple objective functions conflict with each other; the objective functions include a first type function and a second type function, the first type function is calculated based on the first type income and the second type income; the second type function is calculated based on the first type expenditure and the second type expenditure; Performing data preprocessing and standardization operations on the historical data of the object to be processed to obtain target data; Calculating the function value of the objective function corresponding to the object to be processed by using the target data of the object to be processed; Constructing a first population whose size is a first value and whose individual length is a second value; wherein the second value is the total number of objects to be processed, each parent set in the first population is a randomly sorted combination of the objects to be processed, and in the parent set, the weight of the object to be processed is related to the position of the object to be processed in the parent set; For each of the parent sets, based on the function value of the objective function corresponding to the object to be processed in the parent set and the weight of the object to be processed, calculate the function value of the objective function corresponding to the parent set; Generate a child set corresponding to the parent set, form the parent set and the child set into a second population, and perform a sequence adjustment operation on each set in the second population to obtain a third population; Sorting the sets in the third population to obtain a first sorting result, and based on the first sorting result, screening out sets whose number is the first value from the third population to obtain a new first population, returning to execute the step of calculating the function value of the objective function corresponding to the parent set based on the function value of the objective function corresponding to the object to be processed in the parent set and the weight of the object to be processed for each parent set, and executing sequentially until the number of iterations reaches a preset number, and stopping to obtain a target population; Based on the function value of the objective function of the set in the target population, performing a sorting operation on the set in the target population to obtain a second sorting result; Based on the second sorting result, a target set is screened out from the target population, and the target set is sorted based on a difference in function values of the target functions corresponding to the target set to obtain a third sorting result; The target set at the first position in the third sorting result is screened out, and the sorting order of each to-be-processed object in the screened target set is used as the sorting result of the to-be-processed object.
2. The sorting method according to claim 1, characterized in that: Generate a child set corresponding to the parent set, including: Randomly select two parent sets from the first population as the first parent set and the second parent set respectively; Put multiple elements in the first parent set into the first child set, and insert the remaining elements in the first parent set into the first child set according to the order of the corresponding elements in the second parent set; Put multiple elements in the second parent set into the second child set, and insert the remaining elements in the second parent set into the second child set according to the order of the corresponding elements in the first parent set; The selected parent set is deleted from the first population, and the step of randomly selecting two parent sets from the first population is returned to be executed sequentially until the parent set in the first population is empty, thereby obtaining a plurality of first child sets and a plurality of second child sets; The plurality of first child sets and the plurality of second child sets are combined to obtain a child set.
3. The sorting method according to claim 1, characterized in that: Performing a sequential adjustment operation on each set in the second population, a third population is obtained, including: Randomly select multiple locations; For each set in the second population, the elements at the position are reordered to obtain a third population.
4. The sorting method according to claim 1, characterized in that: Sorting the sets in the third population to obtain a first sorting result includes: Calculating a function value of the objective function of each set in the third cluster; Based on the function value of the objective function of each set in the third cluster, the sets in the third cluster are sorted to obtain a first sorting result; the first sorting result includes a plurality of frontier surfaces arranged in sequence; the frontier surface includes at least one set.
5. The sorting method according to claim 4, characterized in that: Based on the first sorting result, a set whose number is the first value is selected from the third population to obtain a new first population, including: Based on the first sorting result, determining whether the number of sets in the first frontier surface is greater than the first value; If not, determining whether the sum of the number of sets in the first frontier surface and the number of sets in the second frontier surface is greater than the first value; If the sum is greater than the first value, calculating the difference between the first value and the number of sets in the first frontier surface to obtain a third value; Based on the crowding distance, selecting sets whose number is a third value from the sets in the second frontier surface; The set in the first frontier surface and the set screened from the second frontier surface are combined to obtain a new first population.
6. The sorting method according to claim 1, characterized in that: Based on the second sorting result, a target set is screened out from the target population, including: Based on the second sorting result, a set located on the first frontier in the target population is screened out to obtain a target set.
7. A sorting device, characterized in that: include: A function determination module, used to determine the target function corresponding to the object to be processed according to the attribute information of the object to be processed for sorting operation; The number of the objective functions is multiple and the multiple objective functions conflict with each other; the objective functions include a first type function and a second type function, the first type function is calculated based on the first type income and the second type income; the second type function is calculated based on the first type expenditure and the second type expenditure; A data processing module is used to perform data preprocessing and standardization operations on the historical data of the object to be processed to obtain target data; A first function value calculation module, used to calculate the function value of the objective function corresponding to the object to be processed by using the target data of the object to be processed; A population construction module, used to construct a first population whose size is a first value and whose individual length is a second value; wherein the second value is the total number of objects to be processed, each parent set in the first population is a randomly sorted combination of the objects to be processed, and in the parent set, the weight of the object to be processed is related to the position of the object to be processed in the parent set; A second function value calculation module, configured to calculate, for each parent set, a function value of the objective function corresponding to the parent set based on the function value of the objective function corresponding to the object to be processed in the parent set and the weight of the object to be processed; A first population adjustment module is used to generate a child set corresponding to the parent set, form the parent set and the child set into a second population, and perform a sequential adjustment operation on each set in the second population to obtain a third population; a second population adjustment module, configured to perform a sorting operation on the sets in the third population to obtain a first sorting result, and to screen out sets whose number is the first value from the third population based on the first sorting result to obtain a new first population; A judging module, used to judge whether the number of iterations is a preset number; The second function value calculation module is further configured to calculate, for each parent set, the function value of the objective function corresponding to the object to be processed in the parent set and the weight of the object to be processed, if the judgment module determines that the number of iterations is not the preset number; A first sorting processing module is used to obtain a target population when the judgment module determines that the number of iterations is a preset number, and to sort the sets in the target population based on the function value of the objective function of the sets in the target population to obtain a second sorting result; A second sorting processing module is used to screen out a target set from the target population based on the second sorting result, and sort the target set based on the difference of the function value of the target function corresponding to the target set to obtain a third sorting result; The result determination module is used to filter out the target set that is at the first place in the third sorting result, and use the sorting order of each to-be-processed object in the filtered target set as the sorting result of the to-be-processed object.
8. A computer program product, characterized in that It comprises computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the sorting method as claimed in any one of claims 1 to 6.
9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the sorting method as described in any one of claims 1 to 6.
10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the sorting method as described in any one of claims 1 to 6.