Oil metering method and system, electronic equipment and storage medium
By splitting the oil quality pipe transportation path into multiple sub-paths and calculating the settlement volume layer by layer, the problem that the existing technology cannot automatically calculate the settlement volume of multiple metering points is solved, and fast and accurate settlement volume calculation is achieved, reducing the cost.
Patent Information
- Application Number
- CN202411144085.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-02-07
AI Technical Summary
The existing oil metering methods cannot automatically calculate the settlement volume through multiple metering points, resulting in manual intervention and increasing downstream costs.
By traversing each injection point and download point in the preset oil quality pipe transportation path, the path is split into multiple subpaths. Each subpath includes only one injection point and one download point, and the settlement amount of each subpath is calculated layer by layer .
The rapid and accurate calculation of the settlement volume of each subpath is achieved, reducing production costs and reducing manual intervention.
Smart Images

Figure CN119397122A_ABST
Abstract
Description
Background Art
[0002] With the development of oil pipeline technology and the continuous advancement of the digital transformation of the national pipeline network, the digitalization of oil and gas pipeline transportation is particularly important. The measurement of oil pipeline settlement volume is an indispensable part of the digital transformation process. Although the current oil metering hardware technology is relatively complete, it still cannot meet the needs of oil metering in some special scenarios, because the current metering is single-point metering. The amount of downloads or injections at a station is manually entered as the amount of the current node. However, when there are multiple metering points in a route and the calculated price of each metering point is different, we need to split the settlement volume, and the existing metering method cannot automatically calculate the settlement volume of all the routes passed. This will make it impossible to calculate the pipeline price for different oil products, different pipelines, and different injection directions. Manual intervention is required for downstream settlement, which will increase a lot of costs for the downstream. Summary of the invention
[0003] The technical problem to be solved by the present invention is to address the deficiencies of the prior art and specifically provide an oil product metering method, system, electronic device and storage medium, as follows:
[0004] 1) In the first aspect, the present invention provides an oil product metering method, and the specific technical scheme is as follows:
[0005] Traverse each injection point and each download point in the preset oil pipeline transportation path, split the preset oil pipeline transportation path into multiple sub-paths, each sub-path includes only one injection point and one download point, wherein the injection point refers to: a station for injecting oil into the preset oil pipeline transportation path, and the download point refers to: a station for downloading oil from the preset oil pipeline transportation path;
[0006] All sub-paths are calculated layer by layer to calculate the settlement amount of each sub-path.
[0007] The beneficial effects of an oil product metering method provided by the present invention are as follows:
[0008] First, traverse each injection point and each download point in the preset oil pipeline route, split the preset oil pipeline route into multiple sub-paths, and then calculate all sub-paths layer by layer to calculate the settlement amount of each sub-path. This not only ensures the completeness and accuracy of the data, but also can quickly and accurately calculate the settlement amount of each sub-path, greatly reducing production costs.
[0009] On the basis of the above scheme, an oil product metering method of the present invention can also be improved as follows.
[0010] Furthermore, all sub-paths are calculated layer by layer to calculate the settlement amount of each sub-path, including:
[0011] Determine the size relationship between P1 and P2, where P1 is the download volume of the subpath from the first injection point to the first download point, and P2 is the sum of the injection volume and the balance of the subpath from the second injection point to the first download point;
[0012] When P1=P2, the injection amount of the subpath from the second injection point to the first download point is used as the settlement amount of the subpath from the second injection point to the first download point; when P1>P2, the injection amount of the subpath from the second injection point to the first download point is used as the settlement amount of the subpath from the second injection point to the first download point, and P2-P1 is used as the settlement amount of the subpath from the first injection point to the first download point; when P1<P2, P1 is used as the settlement amount of the subpath from the second injection point to the first download point. The settlement amount of the sub-path of the download point is calculated, and P1-P2 is used as the balance of the sub-path including the second download point. The relationship between P1-P2 and P3 is then determined. P3 represents the download amount of the sub-path from the first injection point to the second download point. According to the relationship between P1-P2 and P3, the settlement amount of the sub-path from the second injection point to the second download point and the settlement amount of the sub-path from the first injection point to the second download point are calculated, until the settlement amount of each sub-path is calculated.
[0013] Further, according to the size relationship between P1-P2 and P3, the settlement amount of the sub-path from the second injection point to the second download point and the settlement amount of the sub-path from the first injection point to the second download point are calculated, until the settlement amount of each sub-path is calculated, including:
[0014] When P1-P2=P3, P3 is used as the settlement amount of the sub-path from the second injection point to the second download point; when P1-P2<P3, P1-P2 is used as the settlement amount of the sub-path from the second injection point to the second download point, and P3-(P1-P2) is used as the settlement amount of the sub-path from the first injection point to the second download point; when P1-P2>P3, P3 is used as the settlement amount of the sub-path from the second injection point to the second download point, and P1-P2-P3 is used as the surplus amount of the sub-path including the third download point. All sub-paths are traversed to calculate the settlement amount of each sub-path.
[0015] Furthermore, the preset oil pipeline route includes a first injection point, a second injection point, a first download point, a second download point and a third download point which are arranged in sequence.
[0016] 2) In the second aspect, the present invention also provides an oil product metering system, and the specific technical solution is as follows:
[0017] Including path splitting module and settlement volume measurement module;
[0018] The path splitting module is used to traverse each injection point and each downloading point in the preset oil pipeline transportation path, and split the preset oil pipeline transportation path into multiple sub-paths, each sub-path includes only one injection point and one downloading point, wherein the injection point refers to: a station for injecting oil into the preset oil pipeline transportation path, and the downloading point refers to: a station for downloading oil from the preset oil pipeline transportation path;
[0019] The settlement volume measurement module is used to: perform layer-by-layer calculations on all sub-paths to calculate the settlement volume of each sub-path.
[0020] On the basis of the above scheme, an oil product metering system of the present invention can also be improved as follows.
[0021] Furthermore, the settlement volume metering module is specifically used for:
[0022] Determine the size relationship between P1 and P2, where P1 is the download volume of the subpath from the first injection point to the first download point, and P2 is the sum of the injection volume and the balance of the subpath from the second injection point to the first download point;
[0023] When P1=P2, the injection amount of the subpath from the second injection point to the first download point is used as the settlement amount of the subpath from the second injection point to the first download point; when P1>P2, the injection amount of the subpath from the second injection point to the first download point is used as the settlement amount of the subpath from the second injection point to the first download point, and P2-P1 is used as the settlement amount of the subpath from the first injection point to the first download point; when P1<P2, P1 is used as the settlement amount of the subpath from the second injection point to the first download point. The settlement amount of the sub-path of the download point is calculated, and P1-P2 is used as the balance of the sub-path including the second download point. The relationship between P1-P2 and P3 is then determined. P3 represents the download amount of the sub-path from the first injection point to the second download point. According to the relationship between P1-P2 and P3, the settlement amount of the sub-path from the second injection point to the second download point and the settlement amount of the sub-path from the first injection point to the second download point are calculated, until the settlement amount of each sub-path is calculated.
[0024] Furthermore, the settlement volume metering module is also specifically used for:
[0025] When P1-P2=P3, P3 is used as the settlement amount of the sub-path from the second injection point to the second download point; when P1-P2<P3, P1-P2 is used as the settlement amount of the sub-path from the second injection point to the second download point, and P3-(P1-P2) is used as the settlement amount of the sub-path from the first injection point to the second download point; when P1-P2>P3, P3 is used as the settlement amount of the sub-path from the second injection point to the second download point, and P1-P2-P3 is used as the surplus amount of the sub-path including the third download point. All sub-paths are traversed to calculate the settlement amount of each sub-path.
[0026] Furthermore, the preset oil pipeline route includes a first injection point, a second injection point, a first download point, a second download point and a third download point which are arranged in sequence.
[0027] 3) In a third aspect, the present invention further provides an electronic device, comprising a processor, the processor being coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor, so that the electronic device implements any of the above-mentioned oil product metering methods.
[0028] 4) In a fourth aspect, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor so that a computer implements any of the above-mentioned oil metering methods.
[0029] It should be noted that the beneficial effects achieved by the technical solutions of the second to fourth aspects of the present invention and the corresponding possible implementation methods can be found in the above-mentioned technical effects of the first aspect and its corresponding possible implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0031] Figure 1 A schematic diagram of a flow chart of an oil product metering method according to an embodiment of the present invention;
[0032] Figure 2 This is the distribution map of the station field;
[0033] Figure 3 It is the algorithm logic diagram for measuring settlement amount;
[0034] Figure 4 It is a structural schematic diagram of an oil product metering system according to an embodiment of the present invention;
[0035] Figure 5 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0037] like Figure 1 As shown, an oil product metering method according to an embodiment of the present invention comprises the following steps:
[0038] S1. Traverse each injection point and each download point in the preset oil product pipeline transportation path, and split the preset oil product pipeline transportation path into multiple sub-paths, each sub-path includes only one injection point and one download point, wherein the injection point refers to: a station for injecting oil products into the preset oil product pipeline transportation path, and the download point refers to: a station for downloading oil products from the preset oil product pipeline transportation path;
[0039] S2. Calculate all sub-paths layer by layer to calculate the settlement amount of each sub-path.
[0040] Optionally, in S2, all sub-paths are calculated layer by layer to calculate the settlement amount of each sub-path, including:
[0041] S20, determining the size relationship between P1 and P2, where P1 is the download amount of the subpath from the first injection point to the first download point, and P2 is the sum of the injection amount and the balance of the subpath from the second injection point to the first download point;
[0042] S21. When P1=P2, the injection amount of the subpath from the second injection point to the first download point is used as the settlement amount of the subpath from the second injection point to the first download point; when P1>P2, the injection amount of the subpath from the second injection point to the first download point is used as the settlement amount of the subpath from the second injection point to the first download point, and P2-P1 is used as the settlement amount of the subpath from the first injection point to the first download point; when P1<P2, P1 is used as the settlement amount of the subpath from the second injection point to the first download point, and Take P1-P2 as the balance of the sub-path including the second download point (that is, take P1-P2 as the balance of the sub-path including the next download point), and then judge the size relationship between P1-P2 and P3, P3 represents: the download amount of the sub-path from the first injection point to the second download point, and according to the size relationship between P1-P2 and P3, calculate the settlement amount of the sub-path from the second injection point to the second download point, and the settlement amount of the sub-path from the first injection point to the second download point, until the settlement amount of each sub-path is calculated.
[0043] Optionally, in S21, according to the size relationship between P1-P2 and P3, the settlement amount of the sub-path from the second injection point to the second download point and the settlement amount of the sub-path from the first injection point to the second download point are calculated until the settlement amount of each sub-path is calculated, including:
[0044] When P1-P2=P3, P3 is used as the settlement amount of the sub-path from the second injection point to the second download point; when P1-P2<P3, P1-P2 is used as the settlement amount of the sub-path from the second injection point to the second download point, and P3-(P1-P2) is used as the settlement amount of the sub-path from the first injection point to the second download point; when P1-P2>P3, P3 is used as the settlement amount of the sub-path from the second injection point to the second download point, and P1-P2-P3 is used as the balance of the sub-path including the third download point (that is, P1-P2-P3 is used as the balance of the sub-path including the next download point). All sub-paths are traversed to calculate the settlement amount of each sub-path.
[0045] Optionally, in the above technical solution, the preset oil pipeline route includes a first injection point, a second injection point, a first download point, a second download point and a third download point arranged in sequence.
[0046] The present invention mainly establishes a recursive algorithm, calculates the settlement amount of the stations in the route layer by layer, and finally calculates the settlement amount of the outermost route station. For example, there is such a route in a certain oil pipeline route. In the entire route between the starting station and the ending station, there are other injection points and download points, which leads to the inaccurate settlement amount of the ending station calculated directly through the starting station and the ending station. The present invention is explained through the following embodiments.
[0047] In this embodiment, if Figure 2 As shown, the preset oil pipeline transportation path includes the first injection point (starting station), the second injection point, the first download point, the second download point and the third download point (ending station) arranged in sequence, and all sub-paths include: the sub-path from the first injection point to the first download point, the sub-path from the second injection point to the first download point, the sub-path from the first injection point to the second download point, the sub-path from the second injection point to the second download point, the sub-path from the first injection point to the third download point, and the sub-path from the second injection point to the third download point. Figure 2 In the figure, the downward arrow indicates that the oil is injected into the preset oil pipeline path, and the upward arrow indicates that the oil is unloaded from the preset oil pipeline path. Figure 3 As shown, the specific calculation process is as follows:
[0048] Before performing the settlement of each sub-path, the known data that can be obtained are: the download amount of each download point, the injection amount of the first injection point, as shown in Table 1. When calculating the settlement amount of the sub-path from the first injection point to the first download point, the download amount B of the first download point is required. When calculating the settlement amount of the sub-path from the second injection point to the first download point, the download amount A of the second injection point is required. When calculating the settlement amount of the sub-path of the sub-path from the first injection point to the second download point, the download amount C of the second download point is required. When calculating the sub-path from the first injection point to the third download point, the download amount D of the third download point is required. Since there may be a surplus after each calculation, the surplus refers to the part where the injection amount each time is greater than the download amount. The surplus is the input for calculating the next settlement amount. If there is still a surplus at the end of the calculation, this part of the surplus needs to be calculated into the next settlement amount calculation and calculated as the injection amount. This example is the injection amount from the second injection point to the first download point.
[0049] Table 1:
[0050]
[0051] If there are multiple injection points before the first download point, it can be calculated to merge these injection points, which are collectively referred to as injection from the second injection point to the first download point in this article.
[0052] Compare the download amount P1 of the subpath from the first injection point to the first download point (since there is only an injection point before the first download point, P1=B) with the sum of the injection amount A and the balance W (W is a known amount) of the subpath from the second injection point to the first download point (i.e. P2), then:
[0053] 1) If A+W=B (i.e., P1=P2), the settlement amount of the sub-path from the second injection point to the first download point is the injection amount of the sub-path from the second injection point to the first download point. That is to say, the injection amount of the sub-path from the second injection point to the first download point is used as the settlement amount of the sub-path from the second injection point to the first download point, the injection amount of the sub-path from the first injection point to the second download point is used as the settlement amount of the sub-path from the first injection point to the second download point, and the download amount of the sub-path from the first injection point to the third download point is used as the settlement amount of the sub-path from the first injection point to the third download point.
[0054] 2) If (A + W) < B (i.e., P1 > P2), then the download volume at the first download point needs to be split. The injection volume of the sub-path from the second injection point to the first download point is used as the settlement volume of the sub-path from the second injection point to the first download point, (P2 - P1) is used as the settlement volume of the sub-path from the first injection point to the first download point, the injection volume of the sub-path from the first injection point to the second download point is used as the settlement volume of the sub-path from the first injection point to the second download point, and the download volume of the sub-path from the first injection point to the third download point is used as the settlement volume of the sub-path from the first injection point to the third download point.
[0055] 3) If (A + W) > B (i.e., P1 < P2), then B is used as the settlement volume of the sub-path from the second injection point to the first download point. That is to say, P1 is used as the settlement volume of the sub-path from the second injection point to the first download point, and (A + W) - B is used as the remaining amount after this settlement, which will be used as the injection volume of the sub-path in the downstream battlefield, i.e., the sub-path including the second download point, for settlement. That is to say, (P1 - P2) is used as the remaining amount of the sub-path including the second download point, and this remaining amount is used as the injection volume of the second download point.
[0056] When calculating the settlement volume of the sub-path of the battlefield including the second download point, it is necessary to compare the magnitude relationship between P1 - P2 and P3. Since P1 - P2 = (A + W) - B and P3 = C, that is to compare the magnitude relationship between (A + W) - B and C. Among them, P3 represents: the download volume of the sub-path from the first injection point to the second download point. Then:
[0057] 1) If (A + W) - B = C, i.e., P1 - P2 = P3, then P3 (i.e., C) is used as the settlement volume of the sub-path from the second injection point to the second download point.
[0058] 2) If (A + W) - B < C, i.e., P1 - P2 < P3, then the download volume at the second download point needs to be split. (A + W) - B is used as the settlement volume of the sub-path from the second injection point to the second download point. That is to say, (P1 - P2) is used as the settlement volume of the sub-path from the second injection point to the second download point, and C - ((A + W) - B) is used as the settlement volume of the sub-path from the first injection point to the second download point. That is to say, P3 - (P1 - P2) is used as the settlement volume of the sub-path from the first injection point to the second download point;
[0059] 3) If (A + W) - B > C, that is, P1 - P2 > P3, then the settlement volume of the sub-path from the second injection point to the second download point is settled according to C. That is to say, P3 is taken as the settlement volume of the sub-path from the second injection point to the second download point, and (A + W) - B - C becomes the surplus at the second download point. That is to say, P1 - P2 - P3 is taken as the surplus of the sub-path including the third download point and is settled as the injection volume of the sub-path of the downstream battlefield, that is, the third download point.
[0060] When calculating the settlement volume of the sub-path including the battlefield of the third download point, further compare the size relationship between P1 - P2 - P3 and P4, where P4 represents: the download volume of the sub-path from the first injection point to the third download point. Since P1 - P2 - P3 = A + W - B - C and P4 = D, that is, compare the size relationship between A + W - B - C and D. Then:
[0061] 1) If A + W - B - C = D, that is, P1 - P2 - P3 = P4, then D is taken as the settlement volume of the sub-path from the second injection point to the third download point;
[0062] 2) If A + W - B - C < D, that is, P1 - P2 - P3 < P4, then split the download volume of the third download point, take A + W - B - C as the settlement volume of the sub-path from the second injection point to the third download point for subsequent settlement. That is to say, P1 - P2 - P3 is taken as the settlement volume of the sub-path from the second injection point to the third download point, and D - (A + W - B - C) is taken as the settlement volume of the sub-path from the first injection point to the third download point. That is to say, P4 - (P1 - P2 - P3) is taken as the settlement volume of the sub-path from the first injection point to the third download point.
[0063] 3) If A + W - B - C > D, that is, P1 - P2 - P3 > P4, then D is taken as the settlement volume of the sub-path from the second injection point to the third download point, and (A + W - B - C) - D is taken as the surplus for the calculation of the next period's settlement volume. That is to say, enter the calculation of the settlement volume of the sub-path including the next download point.
[0064] In the above embodiments, although the steps are numbered S1, S2, etc., these are only specific embodiments given by the present invention. Those skilled in the art can adjust the execution order of S1, S2, etc. according to the actual situation, which is also within the protection scope of the present invention. It can be understood that in some embodiments, it may include some or all of the above embodiments.
[0065] As Figure 4 shown, an oil product metering system 200 according to an embodiment of the present invention includes a path splitting module 201 and a settlement volume metering module 202;
[0066] The path splitting module 201 is used to traverse each injection point and each downloading point in the preset oil product pipeline transportation path, and split the preset oil product pipeline transportation path into multiple sub-paths, each sub-path includes only one injection point and one downloading point, wherein the injection point refers to: a station field for injecting oil products into the preset oil product pipeline transportation path, and the downloading point refers to: a station field for downloading oil products from the preset oil product pipeline transportation path;
[0067] The settlement amount measurement module 202 is used to perform layer-by-layer calculations on all sub-paths to calculate the settlement amount of each sub-path.
[0068] Optionally, in the above technical solution, the settlement amount metering module 202 is specifically used for:
[0069] Determine the size relationship between P1 and P2, where P1 is the download volume of the subpath from the first injection point to the first download point, and P2 is the sum of the injection volume and the balance of the subpath from the second injection point to the first download point;
[0070] When P1=P2, the injection amount of the subpath from the second injection point to the first download point is used as the settlement amount of the subpath from the second injection point to the first download point; when P1>P2, the injection amount of the subpath from the second injection point to the first download point is used as the settlement amount of the subpath from the second injection point to the first download point, and P2-P1 is used as the settlement amount of the subpath from the first injection point to the first download point; when P1<P2, P1 is used as the settlement amount of the subpath from the second injection point to the first download point. The settlement amount of the sub-path of the download point is calculated, and P1-P2 is used as the balance of the sub-path including the second download point. The relationship between P1-P2 and P3 is then determined. P3 represents the download amount of the sub-path from the first injection point to the second download point. According to the relationship between P1-P2 and P3, the settlement amount of the sub-path from the second injection point to the second download point and the settlement amount of the sub-path from the first injection point to the second download point are calculated, until the settlement amount of each sub-path is calculated.
[0071] Optionally, in the above technical solution, the settlement amount metering module 202 is further specifically used for:
[0072] When P1-P2=P3, P3 is used as the settlement amount of the sub-path from the second injection point to the second download point; when P1-P2<P3, P1-P2 is used as the settlement amount of the sub-path from the second injection point to the second download point, and P3-(P1-P2) is used as the settlement amount of the sub-path from the first injection point to the second download point; when P1-P2>P3, P3 is used as the settlement amount of the sub-path from the second injection point to the second download point, and P1-P2-P3 is used as the surplus amount of the sub-path including the third download point. All sub-paths are traversed to calculate the settlement amount of each sub-path.
[0073] Optionally, in the above technical solution, the preset oil pipeline route includes a first injection point, a second injection point, a first download point, a second download point and a third download point arranged in sequence.
[0074] It should be noted that the beneficial effects of the oil product metering system 200 provided in the above embodiment are the same as the beneficial effects of the above oil product metering method, which will not be described in detail here. In addition, when the system provided in the above embodiment realizes its functions, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to actual conditions to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be described in detail here.
[0075] like Figure 5 As shown, an electronic device 300 according to an embodiment of the present invention includes a processor 320, the processor 320 is coupled to a memory 310, and the memory 310 stores at least one computer program 330, and the at least one computer program 330 is loaded and executed by the processor 320, so that the electronic device 300 implements any of the above-mentioned oil product measurement methods, specifically:
[0076] The electronic device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors 320 (Central Processing Units, CPU) and one or more memories 310, wherein at least one computer program 330 is stored in the one or more memories 310, and the at least one computer program 330 is loaded and executed by the one or more processors 320, so that the electronic device 300 implements any oil product metering method provided in the above embodiments. Of course, the electronic device 300 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The electronic device 300 may also include other components for realizing the functions of the device, which will not be described in detail here. The electronic device may specifically be a computer, etc.
[0077] A computer-readable storage medium according to an embodiment of the present invention stores at least one computer program, and the at least one computer program is loaded and executed by a processor so that a computer implements any of the above-mentioned oil product metering methods.
[0078] Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0079] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs any of the above-mentioned oil product metering methods.
[0080] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects and represent the definition of a specific order or sequence. The order of use of similar objects can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than the order shown or described.
[0081] Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), or it can be a combination of hardware and software, which is generally referred to as "circuit", "module" or "system" herein. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code.
[0082] Any combination of one or more computer-readable media can be used. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0083] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for measuring oil products, characterized in that: include: Traversing each injection point and each download point in the preset oil pipeline transportation path, splitting the preset oil pipeline transportation path into multiple sub-paths, each sub-path includes only one injection point and one download point, wherein the injection point refers to: a station field for injecting oil into the preset oil pipeline transportation path, and the download point refers to: a station field for downloading oil from the preset oil pipeline transportation path; All sub-paths are calculated layer by layer to calculate the settlement amount of each sub-path.
2. The oil product metering method according to claim 1, characterized in that: Calculate all sub-paths layer by layer to calculate the settlement amount of each sub-path, including: Determine the size relationship between P1 and P2, where P1 is the download volume of the subpath from the first injection point to the first download point, and P2 is the sum of the injection volume and the balance of the subpath from the second injection point to the first download point; When P1=P2, the injection amount of the subpath from the second injection point to the first download point is used as the settlement amount of the subpath from the second injection point to the first download point; when P1>P2, the injection amount of the subpath from the second injection point to the first download point is used as the settlement amount of the subpath from the second injection point to the first download point, and P2-P1 is used as the settlement amount of the subpath from the first injection point to the first download point; when P1<P2, P1 is used as the settlement amount of the subpath from the second injection point to the first download point. The settlement amount of the sub-path of the download point is calculated, and P1-P2 is used as the balance of the sub-path including the second download point. The relationship between P1-P2 and P3 is then determined. P3 represents the download amount of the sub-path from the first injection point to the second download point. According to the relationship between P1-P2 and P3, the settlement amount of the sub-path from the second injection point to the second download point and the settlement amount of the sub-path from the first injection point to the second download point are calculated, until the settlement amount of each sub-path is calculated.
3. The oil product metering method according to claim 2, characterized in that: According to the size relationship between P1-P2 and P3, the settlement amount of the sub-path from the second injection point to the second download point and the settlement amount of the sub-path from the first injection point to the second download point are calculated until the settlement amount of each sub-path is calculated, including: When P1-P2=P3, P3 is used as the settlement amount of the sub-path from the second injection point to the second download point; when P1-P2<P3, P1-P2 is used as the settlement amount of the sub-path from the second injection point to the second download point, and P3-(P1-P2) is used as the settlement amount of the sub-path from the first injection point to the second download point; when P1-P2>P3, P3 is used as the settlement amount of the sub-path from the second injection point to the second download point, and P1-P2-P3 is used as the surplus amount of the sub-path including the third download point. All sub-paths are traversed to calculate the settlement amount of each sub-path.
4. An oil product metering method according to any one of claims 1 to 3, characterized in that: The preset oil pipeline transportation route includes a first injection point, a second injection point, a first download point, a second download point and a third download point which are arranged in sequence.
5. An oil product metering system, characterized in that: Including path splitting module and settlement volume measurement module; The path splitting module is used to traverse each injection point and each downloading point in the preset oil product pipeline transportation path, and split the preset oil product pipeline transportation path into multiple sub-paths, each sub-path includes only one injection point and one downloading point, wherein the injection point refers to: a station field for injecting oil products into the preset oil product pipeline transportation path, and the downloading point refers to: a station field for downloading oil products from the preset oil product pipeline transportation path; The settlement amount metering module is used to perform layer-by-layer calculations on all sub-paths to calculate the settlement amount of each sub-path.
6. An oil product metering system according to claim 5, characterized in that: The settlement volume metering module is specifically used for: Determine the size relationship between P1 and P2, where P1 is the download volume of the subpath from the first injection point to the first download point, and P2 is the sum of the injection volume and the balance of the subpath from the second injection point to the first download point; When P1=P2, the injection amount of the subpath from the second injection point to the first download point is used as the settlement amount of the subpath from the second injection point to the first download point; when P1>P2, the injection amount of the subpath from the second injection point to the first download point is used as the settlement amount of the subpath from the second injection point to the first download point, and P2-P1 is used as the settlement amount of the subpath from the first injection point to the first download point; when P1<P2, P1 is used as the settlement amount of the subpath from the second injection point to the first download point. The settlement amount of the sub-path of the download point is calculated, and P1-P2 is used as the balance of the sub-path including the second download point. The relationship between P1-P2 and P3 is then determined. P3 represents the download amount of the sub-path from the first injection point to the second download point. According to the relationship between P1-P2 and P3, the settlement amount of the sub-path from the second injection point to the second download point and the settlement amount of the sub-path from the first injection point to the second download point are calculated, until the settlement amount of each sub-path is calculated.
7. An oil product metering system according to claim 6, characterized in that: The settlement amount metering module is also specifically used for: When P1-P2=P3, P3 is used as the settlement amount of the sub-path from the second injection point to the second download point; when P1-P2<P3, P1-P2 is used as the settlement amount of the sub-path from the second injection point to the second download point, and P3-(P1-P2) is used as the settlement amount of the sub-path from the first injection point to the second download point; when P1-P2>P3, P3 is used as the settlement amount of the sub-path from the second injection point to the second download point, and P1-P2-P3 is used as the surplus amount of the sub-path including the third download point. All sub-paths are traversed to calculate the settlement amount of each sub-path.
8. An oil product metering system according to any one of claims 5 to 7, characterized in that: The preset oil pipeline transportation route includes a first injection point, a second injection point, a first download point, a second download point and a third download point which are arranged in sequence.
9. An electronic device, characterized in that: The electronic device includes a processor, the processor is coupled to a memory, the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the electronic device implements an oil product metering method as described in any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor so that a computer implements an oil product metering method as claimed in any one of claims 1 to 4.