Method and device for determining logistics composite index value
By obtaining the logistics composite index calculation request and using the preset data processing engine to calculate the logistics composite index value, the problem of low efficiency in determining the logistics composite index value in the prior art is solved, and more efficient calculation is achieved.
Patent Information
- Application Number
- CN202310700550.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-13
- Publication Date
- 2024-12-13
AI Technical Summary
In the prior art, the method of determining the value of logistics composite index is low efficiency, especially when there is a correlation between multiple target composite indexes, resulting in many nesting levels and low computing efficiency.
By obtaining the logistics composite indicator calculation request, the target composite indicator expression and basic indicator set are determined using the preset composite indicator mapping relationship, the logistics composite indicator value is calculated in combination with the preset data processing engine, and missing indicators and priority are processed when necessary to reduce Program nesting hierarchy.
The efficiency of determining the value of logistics composite index is improved, the program nesting level is reduced, and the computing efficiency is improved.
Smart Images

Figure CN119130283A_ABST
Abstract
Description
Technical Field
[0001] The present application mainly relates to the field of logistics technology, and specifically to a method and device for determining a composite index value of logistics. Background Art
[0002] When calculating indicators, data developers usually use SQL to operate data. Because SQL has little support for loops, recursion and other functions, and to ensure that the calculation template has wide applicability, only one operation is performed each time. Therefore, the calculation of large-scale and complex target composite indicators has always been a major technical difficulty for data developers. For example, the calculation formula of indicator A is (a+b) / c×(d+c), and the calculation formula of indicator B is (A+e) / f. To calculate indicator B, it is necessary to configure the first-level calculation logic of two intermediate indicators A1=a+b and A2=d+c, and then configure the second and third-level calculation logic of intermediate indicators A3=A1 / c and A=A3*A2, and then configure the fourth and fifth-level calculation logic of intermediate indicators B1=A+e and B=B1 / f. If a target composite indicator depends on many indicators and there is correlation between the indicators, the program will need to be nested at many levels, resulting in low calculation efficiency.
[0003] That is, the method for determining the composite index value of logistics in the prior art is less efficient. Summary of the invention
[0004] The present application provides a method and device for determining a composite index value of logistics, aiming to solve the problem of low efficiency of the method for determining a composite index value of logistics in the prior art.
[0005] In a first aspect, the present application provides a method for determining a composite index value of logistics, the method for determining a composite index value of logistics comprising:
[0006] Obtaining a logistics composite index calculation request, wherein the logistics composite index calculation request includes a plurality of target composite indicators;
[0007] Determine, according to the target composite index calculation request, each target composite index expression corresponding to each target composite index and each basic index set corresponding to each target composite index from a preset composite index mapping relationship;
[0008] Obtaining the basic indicator value of each basic indicator in each of the basic indicator sets, and obtaining each first basic indicator value set corresponding to each basic indicator set;
[0009] A preset data processing engine is used to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set.
[0010] Optionally, the using a preset data processing engine to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set includes:
[0011] Determine whether each basic indicator in the basic indicator set has a corresponding basic indicator value;
[0012] A basic indicator for which there is no corresponding basic indicator value is determined as a missing indicator;
[0013] If all the missing indicators in the first basic indicator value set belong to preset replacement type indicators, the basic indicator values of the missing indicators in the first basic indicator value set are determined as preset replacement values to obtain a second basic indicator set;
[0014] A preset data processing engine is used to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the second basic index value set.
[0015] Optionally, the using a preset data processing engine to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the second basic index value set includes:
[0016] Obtaining the indicator priority of each of the target composite indicators;
[0017] The target composite index expression and the second basic index value set of each target composite index are input into a preset data processing engine in order from large to small according to the index priority, so as to obtain the logistics composite index value of each target composite index.
[0018] Optionally, the obtaining the indicator priority of each of the target composite indicators includes:
[0019] Obtaining the number of missing indicators of each basic indicator set corresponding to each of the target composite indicators;
[0020] The indicator priority of each of the target composite indicators is determined according to the number of missing indicators of each of the target composite indicators.
[0021] Optionally, determining the indicator priority of each of the target composite indicators according to the number of missing indicators of each of the target composite indicators includes:
[0022] Performing syntax analysis on each target composite indicator expression corresponding to each target composite indicator to obtain the syntax tree depth of each target composite indicator;
[0023] The indicator priority of each of the target composite indicators is determined according to the syntax tree depth of each of the target composite indicators and the number of missing indicators of each of the target composite indicators.
[0024] Optionally, the using of a preset data processing engine to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set includes:
[0025] The preset data processing engine is used to call the SpEL expression language to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set.
[0026] Optionally, the method for determining the logistics composite index value further includes:
[0027] If there is a missing indicator in the first basic indicator value set that does not belong to the preset replacement type indicator, the processing of the first basic indicator value set is stopped and a prompt message is issued.
[0028] In a second aspect, the present application provides a device for determining a composite index value of logistics, the device for determining a composite index value of logistics comprising:
[0029] A first acquisition unit is used to acquire a logistics composite index calculation request, wherein the logistics composite index calculation request includes a plurality of target composite indicators;
[0030] A determination unit, configured to determine, according to the target composite index calculation request, each target composite index expression corresponding to each target composite index and each basic index set corresponding to each target composite index from a preset composite index mapping relationship;
[0031] A second acquisition unit is used to acquire a basic indicator value of each basic indicator in each of the basic indicator sets to obtain each first basic indicator value set corresponding to each basic indicator set;
[0032] A calculation unit is used to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set by using a preset data processing engine.
[0033] Optionally, the computing unit is used to:
[0034] Determine whether each basic indicator in the basic indicator set has a corresponding basic indicator value;
[0035] A basic indicator for which there is no corresponding basic indicator value is determined as a missing indicator;
[0036] If all the missing indicators in the first basic indicator value set belong to preset replacement type indicators, the basic indicator values of the missing indicators in the first basic indicator value set are determined as preset replacement values to obtain a second basic indicator set;
[0037] A preset data processing engine is used to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the second basic index value set.
[0038] Optionally, the computing unit is used to:
[0039] Obtaining the indicator priority of each of the target composite indicators;
[0040] The target composite index expression and the second basic index value set of each target composite index are input into a preset data processing engine in order from large to small according to the index priority, so as to obtain the logistics composite index value of each target composite index.
[0041] Optionally, the computing unit is used to:
[0042] Obtaining the number of missing indicators of each basic indicator set corresponding to each of the target composite indicators;
[0043] The indicator priority of each of the target composite indicators is determined according to the number of missing indicators of each of the target composite indicators.
[0044] Optionally, the computing unit is used to:
[0045] Performing syntax analysis on each target composite indicator expression corresponding to each target composite indicator to obtain the syntax tree depth of each target composite indicator;
[0046] The indicator priority of each of the target composite indicators is determined according to the syntax tree depth of each of the target composite indicators and the number of missing indicators of each of the target composite indicators.
[0047] Optionally, the computing unit is used to:
[0048] The preset data processing engine is used to call the SpEL expression language to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set.
[0049] Optionally, the computing unit is used to:
[0050] If there is a missing indicator in the first basic indicator value set that does not belong to the preset replacement type indicator, the processing of the first basic indicator value set is stopped and a prompt message is issued.
[0051] In a third aspect, the present application provides an electronic device, the electronic device comprising:
[0052] one or more processors;
[0053] Memory; and
[0054] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the method for determining the logistics composite index value described in any one of the first aspects.
[0055] In a fourth aspect, the present application provides a computer-readable storage medium storing a plurality of instructions suitable for loading by a processor to execute the steps in the method for determining a composite logistics index value described in any one of the first aspects.
[0056] The present application provides a method and device for determining a logistics composite index value, and the method for determining a logistics composite index value includes: obtaining a logistics composite index calculation request, wherein the logistics composite index calculation request includes multiple target composite indicators; determining each target composite index expression corresponding to each target composite indicator and each basic index set corresponding to each target composite indicator from a preset composite index mapping relationship according to the target composite index calculation request; obtaining the basic index value of each basic indicator in each basic index set, and obtaining each first basic index value set corresponding to each basic index set; using a preset data processing engine to calculate the logistics composite index value of each target composite indicator according to the target composite index expression and the first basic index value set of each target composite indicator. The present application pre-sets a preset composite index mapping relationship, and after obtaining the logistics composite index calculation request, obtains the target composite index expression and the basic index set of each target composite indicator according to the preset composite index mapping relationship, and queries the first basic index value set corresponding to the basic index set, and then uses the preset data processing engine to calculate the logistics composite index value of the target composite indicator according to the target composite index expression and the first basic index value set, thereby reducing the level of program nesting and improving the efficiency of the method for determining the logistics composite index value. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for describing the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0058] Figure 1 This is a schematic diagram of a scenario of a system for determining a logistics composite index value provided in an embodiment of the present application;
[0059] Figure 2 It is a schematic flow chart of an embodiment of a method for determining a composite index value of logistics provided in an embodiment of the present application;
[0060] Figure 3 It is a schematic diagram of the structure of an embodiment of a device for determining a composite index value of logistics provided in an embodiment of the present application;
[0061] Figure 4 It is a schematic diagram of the structure of an embodiment of an electronic device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0063] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first" and "second" are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0064] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. In order to enable any technician in the field to implement and adopt the present application, the following description is given. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without adopting these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0065] The embodiments of the present application provide a method and device for determining a composite index value of logistics, which are described in detail below.
[0066] See also Figure 1 , Figure 1 This is a scenario diagram of a system for determining a composite index value of logistics provided in an embodiment of the present application. The system for determining a composite index value of logistics may include an electronic device 100, in which a device for determining a composite index value of logistics is integrated.
[0067] In the embodiment of the present application, the electronic device 100 can be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the electronic device 100 can be a desktop computer, a portable computer, a network server, a PDA (Personal Digital Assistant), a mobile phone, a tablet computer, a wireless terminal device, a communication device, an embedded device, a smart TV, etc. This embodiment does not limit the type of the electronic device 100.
[0068] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or fewer electronic devices as shown in, e.g. Figure 1 Only one electronic device is shown. It can be understood that the system for determining the logistics composite index value may also include one or more other electronic devices that can process data, which is not specifically limited here.
[0069] In addition, if Figure 1 As shown, the system for determining the composite index value of logistics may also include a memory 200 for storing data.
[0070] It should be noted that Figure 1The scenario diagram of the system for determining the composite index value of logistics is merely an example. The system and scenario for determining the composite index value of logistics described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that, with the evolution of the system for determining the composite index value of logistics and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.
[0071] First, a method for determining a logistics composite index value is provided in an embodiment of the present application, and the method for determining a logistics composite index value includes: obtaining a logistics composite index calculation request, wherein the logistics composite index calculation request includes multiple target composite indicators; determining each target composite index expression corresponding to each target composite indicator and each basic indicator set corresponding to each target composite indicator from a preset composite indicator mapping relationship according to the target composite index calculation request; obtaining the basic indicator value of each basic indicator in each basic indicator set, and obtaining each first basic indicator value set corresponding to each basic indicator set; and calculating the logistics composite index value of each target composite indicator according to the target composite index expression and the first basic indicator value set of each target composite indicator using a preset data processing engine.
[0072] like Figure 2 As shown, Figure 2 : is a flow chart of an embodiment of a method for determining a composite index value of logistics provided in an embodiment of the present application. The method for determining a composite index value of logistics includes the following steps S201 to S204:
[0073] S201. Obtain a logistics composite index calculation request.
[0074] The logistics composite index calculation request includes multiple target composite indexes. The user can initiate a logistics composite index calculation request to the electronic device in various ways, and the electronic device obtains the logistics composite index calculation request. The multiple target composite indexes can be manually set. For example, the multiple target composite indexes may include index A and index B.
[0075] S202: Determine, according to the target composite index calculation request, each target composite index expression corresponding to each target composite index and each basic index set corresponding to each target composite index from a preset composite index mapping relationship.
[0076] In the embodiment of the present application, the preset composite index mapping relationship can be pre-set and stored in the electronic device. The preset composite index mapping relationship can include the composite index code, composite index name, composite index expression, basic index set, and basic index value set of each composite index. Of course, the preset composite index mapping relationship can also include the date, organization code, organization name, and organization level of each composite index.
[0077] In a specific embodiment, the preset composite index mapping relationship is shown in Table 1.
[0078] Table 1:
[0079]
[0080] In the embodiment of the present application, each target composite index expression corresponding to each target composite index and each basic index set corresponding to each target composite index are determined from the preset composite index mapping relationship according to the target composite index calculation request. For example, if the target composite index is index A, the target composite index expression obtained is (a+b) / (c)*(d+c), and the basic index value set is a, b, c, d.
[0081] S203: Obtain a basic indicator value of each basic indicator in each basic indicator set to obtain each first basic indicator value set corresponding to each basic indicator set.
[0082] In the embodiment of the present application, the basic indicator value of each basic indicator in the basic indicator set is obtained from the preset composite indicator mapping relationship. For example, if the target composite indicator is indicator A, the basic indicator values of each basic indicator in the basic indicator set are obtained as a=1, b=3, c=4, d=5 respectively.
[0083] S204. Calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set by using a preset data processing engine.
[0084] In the embodiment of the present application, the preset data processing engine is Spark, a general engine for massive data processing. Apache Spark is a fast and general computing engine designed for large-scale data processing. Spark is a general parallel framework similar to Hadoop MapReduce open sourced by UC Berkeley AMPlab (AMP Laboratory of the University of California, Berkeley). Spark has the advantages of Hadoop MapReduce; but unlike MapReduce, the intermediate output results of the Job can be stored in memory, so there is no need to read and write HDFS, so Spark can be better applied to MapReduce algorithms that require iterations such as data mining and machine learning. Spark has three main characteristics: First, the high-level API strips the focus on the cluster itself, and Spark application developers can focus on the calculation itself to be done by the application. Secondly, Spark is very fast and supports interactive computing and complex algorithms. Finally, Spark is a general engine that can be used to complete a variety of operations, including SQL queries, text processing, machine learning, etc. Before the emergence of Spark, we generally need to learn a variety of engines to handle these requirements separately. Of course, in other embodiments, other computing engines can also be used, which is not limited here.
[0085] Specifically, the preset data processing engine is used to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set, including: using the preset data processing engine to call the SpEL expression language to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set. For example, if the target composite index is index A, the target composite index expression obtained is (a+b) / (c)*(d+c), the basic index value set is a, b, c, d, and the basic index values of each basic indicator in the basic index set are a=1, b=3, c=4, d=5 respectively. Substituting the basic index value set into the target composite index expression, the logistics composite index value is 9.
[0086] The SpEL language is a very powerful language that supports runtime query and operation of object graphs. The language syntax is similar to traditional EL expressions, but it provides many additional features, the most important of which are function calls and basic string template functions. Although there are other Java expression languages, such as OGNL, MVEL, JBoss EL, etc., SpEL is a language created and supported exclusively by the spring community and can be used in all products in the spring product set. Its language features are driven by the product requirements of the spring project set, including tool requirements, which mainly refers to the eclipse-based SpringTool Suite. In other words, SpEl is based on a technology-independent API and allows other language implementations that need to be added to join and integrate them.
[0087] Furthermore, the target composite index expression of each target composite index and the first basic index value set are input into a preset data processing engine to obtain the logistics composite index value of each target composite index, including:
[0088] (1) Determine whether each basic indicator in the basic indicator set has a corresponding basic indicator value.
[0089] (2) Basic indicators that do not have corresponding basic indicator values are determined as missing indicators.
[0090] (3) If all missing indicators in the first basic indicator value set belong to preset replacement type indicators, the basic indicator values of the missing indicators in the first basic indicator value set are determined as preset replacement values to obtain a second basic indicator set.
[0091] Among them, the preset replacement type indicator is an indicator that can be replaced with a preset replacement value, which can be set in advance, and the preset replacement value is manually specified. When calculating a composite indicator, there are cases where the basic indicator values on some dimensions are missing. At this time, directly calling SpEL will throw a calculation exception and fail to get the desired result. However, in some cases, the missing basic indicator values are normal, and the composite indicator still needs to be calculated normally. You can customize the missing basic indicator values calculated by the operator or some of the basic indicator calculation values in the composite indicator mapping, and the replacement values or throwing calculation exceptions in the case of missing values. For example, the mapping of the composite indicator A is A=a+b / cd*f, but if the a value is missing, it will not affect the normal calculation of the composite indicator. At this time, you only need to define the missing basic indicator values on both ends of the plus sign "+" to be replaced with 0; if b, c, d, f are missing, it will not affect the normal calculation of the composite indicator. At this time, you only need to define the division numerator as 0 or the multiplication multiplier as 0.
[0092] Furthermore, when there are missing basic indicator values on certain dimensions, replacement cannot be performed and a calculation exception needs to be thrown. If there are missing indicators that do not belong to the preset replacement type indicators in the first basic indicator value set, the processing of the first basic indicator value set is stopped and a prompt message is issued. When the value calculated by the composite indicator is abnormal, the calculation is stopped to avoid occupying resources. At the same time, there is no need to reverse the hierarchical search for confirmation, and the abnormality can be determined according to the prompt message.
[0093] (4) Utilizing a preset data processing engine, the logistics composite index value of each target composite index is calculated based on the target composite index expression of each target composite index and the second basic index value set.
[0094] In business scenarios, due to the limitation of computing resources, some composite indicators need to be output first. In a specific embodiment, the target composite indicator expression of each target composite indicator and the second basic indicator value set are input into the preset data processing engine to obtain the logistics composite indicator value of each target composite indicator, including:
[0095] (1) Obtain the indicator priority of each target composite indicator.
[0096] In the embodiment of the present application, the indicator priority can be preset. The higher the indicator priority, the higher the priority of the indicator.
[0097] (2) Inputting the target composite index expression and the second basic index value set of each target composite index into a preset data processing engine in order from large to small according to the index priority, and obtaining the logistics composite index value of each target composite index.
[0098] In a specific embodiment, obtaining the indicator priority of each target composite indicator may include:
[0099] (1) Obtain the number of missing indicators of each basic indicator set corresponding to each target composite indicator.
[0100] For example, the number of missing indicators of the basic indicator set corresponding to the composite indicator A is 3, and the number of missing indicators of the basic indicator set corresponding to the composite indicator B is 2.
[0101] (2) Determine the indicator priority of each target composite indicator based on the number of missing indicators of each target composite indicator.
[0102] Among them, the greater the number of missing indicators, the lower the indicator priority.
[0103] In a specific embodiment, the indicator priority of each target composite indicator is determined according to the number of missing indicators of each target composite indicator, including: performing syntax analysis on each target composite indicator expression corresponding to each target composite indicator to obtain the syntax tree depth of each target composite indicator; determining the indicator priority of each target composite indicator according to the syntax tree depth of each target composite indicator and the number of missing indicators of each target composite indicator. The syntax tree depth is the number of layers of the syntax tree. The deeper the syntax tree depth, the more complex the identification is, and it needs to be executed in the later stage. Among them, the smaller the syntax tree depth, the higher the indicator priority.
[0104] Syntax tree is an abstract representation of the grammatical structure of the source code. It represents the grammatical structure of the programming language in a tree-like form, and each node on the tree represents a structure in the source code. It is also called an abstract syntax tree. The reason why the syntax is "abstract" is that the syntax here does not represent every detail that appears in the real syntax. For example, nested parentheses are implied in the structure of the tree and are not presented in the form of nodes; and conditional jump statements such as if-condition-then can be represented by nodes with two branches. Given a grammar G = (Vn, Vt, P, S), a syntax tree (derivation tree) associated with any sentence pattern of G can be constructed. Each node in the tree has a label, which is a symbol in V = Vn∪Vt. The syntax tree is a graphical representation of the sentence structure. It represents the derivation result of the sentence and is conducive to understanding the hierarchy of the sentence grammatical structure. Simply put, a syntax tree is a tree formed when a deduction is performed according to a certain rule.
[0105] The present application provides a method for determining a logistics composite index value, and the method for determining a logistics composite index value includes: obtaining a logistics composite index calculation request, wherein the logistics composite index calculation request includes multiple target composite indexes; determining each target composite index expression corresponding to each target composite index and each basic index set corresponding to each target composite index from a preset composite index mapping relationship according to the target composite index calculation request; obtaining the basic index value of each basic index in each basic index set, and obtaining each first basic index value set corresponding to each basic index set; using a preset data processing engine to calculate the logistics composite index value of each target composite index according to the target composite index expression and the first basic index value set of each target composite index. The present application pre-sets a preset composite index mapping relationship, and after obtaining the logistics composite index calculation request, obtains the target composite index expression and the basic index set of each target composite index according to the preset composite index mapping relationship, and queries the first basic index value set corresponding to the basic index set, and then uses the preset data processing engine to calculate the logistics composite index value of the target composite index according to the target composite index expression and the first basic index value set, thereby reducing the level of program nesting and improving the efficiency of the method for determining the logistics composite index value.
[0106] In order to better implement the method for determining the composite index value of logistics in the embodiment of the present application, on the basis of the method for determining the composite index value of logistics, the embodiment of the present application also provides a device for determining the composite index value of logistics, and the device for determining the composite index value of logistics is integrated in an electronic device, such as Figure 3 As shown, the device for determining the composite index value of logistics includes:
[0107] The first acquisition unit 301 is used to acquire a logistics composite index calculation request, wherein the logistics composite index calculation request includes multiple target composite indicators;
[0108] A determination unit 302 is used to determine each target composite indicator expression corresponding to each target composite indicator and each basic indicator set corresponding to each target composite indicator from a preset composite indicator mapping relationship according to the target composite indicator calculation request;
[0109] The second acquisition unit 303 is used to acquire the basic indicator value of each basic indicator in each basic indicator set, and obtain each first basic indicator value set corresponding to each basic indicator set;
[0110] The calculation unit 304 is used to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set by using a preset data processing engine.
[0111] Optionally, the computing unit is configured to:
[0112] Determine whether each basic indicator in the basic indicator set has a corresponding basic indicator value;
[0113] A basic indicator for which there is no corresponding basic indicator value is determined as a missing indicator;
[0114] If all the missing indicators in the first basic indicator value set belong to preset replacement type indicators, the basic indicator values of the missing indicators in the first basic indicator value set are determined as preset replacement values to obtain a second basic indicator set;
[0115] A preset data processing engine is used to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the second basic index value set.
[0116] Optionally, the computing unit is configured to:
[0117] Get the indicator priority of each target composite indicator;
[0118] The target composite indicator expression and the second basic indicator value set of each target composite indicator are input into the preset data processing engine in order from large to small according to the indicator priority, so as to obtain the logistics composite indicator value of each target composite indicator.
[0119] Optionally, the computing unit is configured to:
[0120] Get the number of missing indicators of each basic indicator set corresponding to each target composite indicator;
[0121] The indicator priority of each target composite indicator is determined according to the number of missing indicators of each target composite indicator.
[0122] Optionally, the computing unit is configured to:
[0123] Perform syntax analysis on each target composite indicator expression corresponding to each target composite indicator to obtain the syntax tree depth of each target composite indicator;
[0124] The indicator priority of each target composite indicator is determined according to the syntax tree depth of each target composite indicator and the number of missing indicators of each target composite indicator.
[0125] Optionally, the computing unit is configured to:
[0126] The preset data processing engine is used to call the SpEL expression language to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set.
[0127] Optionally, the computing unit is configured to:
[0128] If there is a missing indicator in the first basic indicator value set that does not belong to the preset replacement type indicator, the processing of the first basic indicator value set is stopped and a prompt message is issued.
[0129] The embodiment of the present application further provides an electronic device, which integrates any one of the logistics composite index value determination devices provided in the embodiment of the present application, and the electronic device includes:
[0130] one or more processors;
[0131] Memory; and
[0132] One or more applications, wherein the one or more applications are stored in a memory and configured to execute, by a processor, the steps of the method for determining a composite logistics index value in any of the above-mentioned embodiments of the method for determining a composite logistics index value.
[0133] like Figure 4 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0134] The electronic device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0135] The processor 601 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 602, and using data stored in the memory 602, the processor 601 performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 601 may include one or more processing cores; the processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, physical interface and application programs, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601.
[0136] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0137] The electronic device also includes a power supply 603 for supplying power to each component. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 603 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
[0138] The electronic device may further include an input unit 604, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to physical settings and function controls.
[0139] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 601 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application programs stored in the memory 602, thereby realizing various functions, as follows:
[0140] Obtain a logistics composite indicator calculation request, wherein the logistics composite indicator calculation request includes multiple target composite indicators; determine each target composite indicator expression corresponding to each target composite indicator and each basic indicator set corresponding to each target composite indicator from a preset composite indicator mapping relationship according to the target composite indicator calculation request; obtain the basic indicator value of each basic indicator in each basic indicator set, and obtain each first basic indicator value set corresponding to each basic indicator set; use a preset data processing engine to calculate the logistics composite indicator value of each target composite indicator according to the target composite indicator expression and the first basic indicator value set of each target composite indicator.
[0141] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0142] To this end, the embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any one of the methods for determining the composite index value of logistics provided in the embodiment of the present application. For example, the computer program loaded by the processor can execute the following steps:
[0143] Obtain a logistics composite indicator calculation request, wherein the logistics composite indicator calculation request includes multiple target composite indicators; determine each target composite indicator expression corresponding to each target composite indicator and each basic indicator set corresponding to each target composite indicator from a preset composite indicator mapping relationship according to the target composite indicator calculation request; obtain the basic indicator value of each basic indicator in each basic indicator set, and obtain each first basic indicator value set corresponding to each basic indicator set; use a preset data processing engine to calculate the logistics composite indicator value of each target composite indicator according to the target composite indicator expression and the first basic indicator value set of each target composite indicator.
[0144] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
[0145] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.
[0146] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0147] The above is a detailed introduction to a method and device for determining a logistics composite index value provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for determining the value of a composite logistics index. It is characterized in that The method for determining the logistics composite index value includes: Obtaining a logistics composite index calculation request, wherein the logistics composite index calculation request includes a plurality of target composite indicators; Determine, according to the target composite index calculation request, each target composite index expression corresponding to each target composite index and each basic index set corresponding to each target composite index from a preset composite index mapping relationship; Obtaining the basic indicator value of each basic indicator in each of the basic indicator sets, and obtaining each first basic indicator value set corresponding to each basic indicator set; A preset data processing engine is used to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set.
2. The method for determining the composite index value of logistics according to claim 1, It is characterized in that The using of a preset data processing engine to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set includes: Determine whether each basic indicator in the basic indicator set has a corresponding basic indicator value; A basic indicator for which there is no corresponding basic indicator value is determined as a missing indicator; If all the missing indicators in the first basic indicator value set belong to preset replacement type indicators, the basic indicator values of the missing indicators in the first basic indicator value set are determined as preset replacement values to obtain a second basic indicator set; A preset data processing engine is used to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the second basic index value set.
3. The method for determining the composite index value of logistics according to claim 2, It is characterized in that The using of a preset data processing engine to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the second basic index value set includes: Obtaining the indicator priority of each of the target composite indicators; The target composite index expression and the second basic index value set of each target composite index are input into a preset data processing engine in order from large to small according to the index priority, so as to obtain the logistics composite index value of each target composite index.
4. The method for determining the composite index value of logistics according to claim 3, It is characterized in that The obtaining of the indicator priority of each target composite indicator includes: Obtaining the number of missing indicators of each basic indicator set corresponding to each of the target composite indicators; The indicator priority of each of the target composite indicators is determined according to the number of missing indicators of each of the target composite indicators.
5. The method for determining the composite index value of logistics according to claim 4, It is characterized in that Determining the indicator priority of each target composite indicator according to the number of missing indicators of each target composite indicator includes: Performing syntax analysis on each target composite indicator expression corresponding to each target composite indicator to obtain the syntax tree depth of each target composite indicator; The indicator priority of each of the target composite indicators is determined according to the syntax tree depth of each of the target composite indicators and the number of missing indicators of each of the target composite indicators.
6. The method for determining the composite index value of logistics according to claim 1, It is characterized in that The method of using a preset data processing engine to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set includes: The preset data processing engine is used to call the SpEL expression language to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set.
7. The method for determining the composite index value of logistics according to claim 2, It is characterized in that The method for determining the logistics composite index value also includes: If there is a missing indicator in the first basic indicator value set that does not belong to the preset replacement type indicator, the processing of the first basic indicator value set is stopped and a prompt message is issued.
8. A device for determining a composite index value of logistics, It is characterized in that The device for determining the composite index value of logistics comprises: A first acquisition unit is used to acquire a logistics composite index calculation request, wherein the logistics composite index calculation request includes a plurality of target composite indicators; A determination unit, configured to determine, according to the target composite index calculation request, each target composite index expression corresponding to each target composite index and each basic index set corresponding to each target composite index from a preset composite index mapping relationship; A second acquisition unit is used to acquire a basic indicator value of each basic indicator in each of the basic indicator sets to obtain each first basic indicator value set corresponding to each basic indicator set; A calculation unit is used to calculate the logistics composite index value of each target composite index according to the target composite index expression of each target composite index and the first basic index value set by using a preset data processing engine.
9. An electronic device, It is characterized in that The electronic device comprises: one or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the method for determining a logistics composite index value according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps of the method for determining a composite logistics index value according to any one of claims 1 to 7.
