Method and device for obtaining annual rent, storage medium and processor
By calculating the number of months and years covered by the rent in the payment ledger, the problem of non-smooth annual rent statistics in the existing technology is solved, and efficient and accurate annual rent acquisition is achieved, which is suitable for complex lease contracts.
Patent Information
- Application Number
- CN202410880455.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-10-01
AI Technical Summary
The existing annual rent acquisition method does not smooth the data when dealing with complex lease contracts, and cannot accurately calculate the annual rent, resulting in inaccurate statistical results.
By obtaining the payment time, rent start time and rent end time in the payment ledger, calculate the number of months and years covered by the rent, and calculate the annual rent for the year to be measured based on this information to ensure that the annual rent statistics are consistent with the actual situation and smooth the curve .
It achieves efficient and accurate acquisition of annual rent, ensuring that annual rent statistics are more consistent with actual conditions and the annual rent curve is smoother, suitable for various leasing contracts.
Smart Images

Figure CN118735705A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, storage medium and processor for obtaining annual rent. Background Art
[0002] All walks of life have the demand for house leasing. When leasing a house, the lessee generally has to pay the rent to the lessor according to the payment ledger. In the business statistics report of the enterprise, it is necessary to count the rent paid each year, which is used for the cost statistics of the enterprise and the cost budget of listed companies.
[0003] The existing method for obtaining annual rent is mainly based on the payment month of the payment ledger. The data collected by this method can only be used for unified lease contracts and is not applicable to certain specific lease contracts, which will result in uneven annual rent data. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, storage medium and processor for obtaining annual rent, which can obtain annual rent efficiently and accurately.
[0005] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a method for obtaining annual rent, the method comprising:
[0006] Obtain a payment ledger, the payment ledger including multiple ledger information, the ledger information including payment time, rent start time, rent end time and payment amount, the rent start time and rent end time both including year information and month information;
[0007] Determine the number of months covered by the first rent in the payment ledger according to the rent start time and rent end time;
[0008] Determine all the years covered by the payment ledger based on the rent start time and rent end time;
[0009] Set any one of all the years as the year to be tested, and determine the number of months covered by the second rent of the year to be tested in each ledger information according to the year to be tested, the rent start time and the rent end time in each ledger information;
[0010] The annual rent for the test year is determined according to the payment amount, the number of months covered by the first rent, and the number of months covered by the second rent.
[0011] Optionally, the rent start time includes the rent start year and the rent start month, and the rent end time includes the rent end year and the rent end month;
[0012] The method of determining the number of months covered by the first rent in the payment ledger according to the rent start time and the rent end time includes: the number of months covered by the first rent = (rent end year - rent start year) * 12 + (rent end month - rent start month) + 1.
[0013] Optionally, all years covered by the payment ledger are determined according to the rent start time and the rent end time, including:
[0014] All years covered in the payment ledger are determined based on the minimum value of the starting time and the maximum value of the rental end time.
[0015] Optionally, determining the number of months covered by the second rent for the year to be tested in each ledger information according to the year to be tested, the rent start time and the rent end time in each ledger information includes:
[0016] If the starting month of the year to be tested is greater than the end time of the rent, or the end month of the year to be tested is less than the starting time of the rent, then the number of months covered by the second rent of the year to be tested is zero;
[0017] If the starting month of the year to be tested is between the rent starting time and the rent ending time, and the ending month of the year to be tested is greater than the rent ending time, then the number of months covered by the second rent of the year to be tested is: the number of months covered by the second rent = (year of the rent ending time - year to be tested) * 12 + (month of the rent ending time - 1) + 1;
[0018] If the end month of the year to be tested is between the rent start time and the rent end time, and the start month of the year to be tested is less than the rent start time, then the number of months covered by the second rent for the year to be tested is: the number of months covered by the second rent = (year to be tested - year of rent start time) * 12 + (12 - month of rent start time) + 1;
[0019] If the starting month and ending month of the year to be tested are both between the rent starting time and the rent ending time, the number of months covered by the second rent of the year to be tested is 12;
[0020] The starting month is January, and the ending month is December.
[0021] Optionally, determining the annual rent for the test year according to the payment amount, the number of months covered by the first rent, and the number of months covered by the second rent includes:
[0022] Determine the rent for the year to be tested corresponding to the ledger information according to the payment amount, the number of months covered by the first rent, and the number of months covered by the second rent in each ledger information;
[0023] The rent of each ledger information is summed up to obtain the annual rent of the year to be tested.
[0024] Optionally, the annual rent of the year to be tested = ∑ [payment amount / (number of months covered by the first rent)*number of months covered by the second rent].
[0025] On the other hand, the present application also discloses a device for obtaining annual rent, the device comprising:
[0026] An acquisition module is used to acquire a payment ledger, wherein the payment ledger includes multiple ledger information, wherein the ledger information includes payment time, rent start time, rent end time and payment amount, wherein the rent start time and rent end time both include year information and month information;
[0027] A first processing module, used to determine the number of months covered by the first rent in the payment ledger according to the rent start time and rent end time;
[0028] The second processing module is used to determine all years covered by the payment ledger according to the rent start time and rent end time;
[0029] The third processing module is used to set any year among all the years as the year to be tested, and determine the number of months covered by the second rent of the year to be tested in each ledger information according to the year to be tested, the rent start time and the rent end time in each ledger information;
[0030] The fourth processing module is used to determine the annual rent of the test year according to the payment amount, the number of months covered by the first rent and the number of months covered by the second rent.
[0031] Optionally, the rent start time includes the rent start year and the rent start month, and the rent end time includes the rent end year and the rent end month;
[0032] The method of determining the number of months covered by the first rent in the payment ledger according to the rent start time and the rent end time includes: the number of months covered by the first rent = (rent end year - rent start year) * 12 + (rent end month - rent start month) + 1.
[0033] Optionally, all years covered by the payment ledger are determined according to the rent start time and the rent end time, including:
[0034] All years covered in the payment ledger are determined based on the minimum value of the starting time and the maximum value of the rental end time.
[0035] Optionally, determining the number of months covered by the second rent for the year to be tested in each ledger information according to the year to be tested, the rent start time and the rent end time in each ledger information includes:
[0036] If the starting month of the year to be tested is greater than the end time of the rent, or the end month of the year to be tested is less than the starting time of the rent, then the number of months covered by the second rent of the year to be tested is zero;
[0037] If the starting month of the year to be tested is between the rent starting time and the rent ending time, and the ending month of the year to be tested is greater than the rent ending time, then the number of months covered by the second rent of the year to be tested is: the number of months covered by the second rent = (year of the rent ending time - year to be tested) * 12 + (month of the rent ending time - 1) + 1;
[0038] If the end month of the year to be tested is between the rent start time and the rent end time, and the start month of the year to be tested is less than the rent start time, then the number of months covered by the second rent for the year to be tested is: the number of months covered by the second rent = (year to be tested - year of rent start time) * 12 + (12 - month of rent start time) + 1;
[0039] If the starting month and ending month of the year to be tested are both between the rent starting time and the rent ending time, the number of months covered by the second rent of the year to be tested is 12;
[0040] The starting month is January, and the ending month is December.
[0041] Optionally, determining the annual rent for the test year according to the payment amount, the number of months covered by the first rent, and the number of months covered by the second rent includes:
[0042] Determine the rent for the year to be tested corresponding to the ledger information according to the payment amount, the number of months covered by the first rent, and the number of months covered by the second rent in each ledger information;
[0043] The rent of each ledger information is summed up to obtain the annual rent of the year to be tested.
[0044] Optionally, the annual rent of the year to be tested = ∑ [payment amount / (number of months covered by the first rent)*number of months covered by the second rent].
[0045] On the other hand, the present application also discloses a processor configured to execute the method for obtaining annual rent as described above.
[0046] On the other hand, the present application also discloses a machine-readable storage medium having instructions stored thereon, which, when executed by a processor, configure the processor to execute the method for obtaining annual rent as described above.
[0047] On the other hand, the present application also discloses a computer program product, including a computer program, which implements the method for obtaining annual rent as described above when executed by a processor.
[0048] A method for obtaining annual rent of the present application includes: obtaining a payment ledger, the payment ledger includes multiple ledger information, the ledger information includes payment time, rent start time, rent end time and payment amount, the rent start time and rent end time both include year information and month information; determine the number of months covered by the first rent in the payment ledger according to the rent start time and rent end time; determine all years covered by the payment ledger according to the rent start time and rent end time; set any year among all the years as the year to be tested, determine the number of months covered by the second rent in each ledger information according to the year to be tested, the rent start time and rent end time in each ledger information; determine the annual rent of the year to be tested according to the payment amount, the number of months covered by the first rent and the number of months covered by the second rent. The present invention uses the relationship between the coverage period of the payment ledger on the lease contract and the statistical year, and calculates the annual rent according to the corresponding ratio, so that the annual rent statistics are more in line with the actual situation, and the corresponding annual rent curve is also smoother, so as to achieve efficient and accurate annual rent acquisition.
[0049] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:
[0051] Figure 1 A schematic diagram of a process of obtaining annual rent according to an embodiment of the present application is shown;
[0052] Figure 2 A schematic diagram of a process according to an embodiment of the present application is shown schematically;
[0053] Figure 3 The annual rent curve according to the embodiment of the present application is schematically shown;
[0054] Figure 4 The internal structure diagram of a computer device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0056] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0057] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0058] The acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. In addition, it should be noted that in the embodiments of this application, some existing solutions in the industry such as certain software, components, and models may be mentioned, and they should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0059] The present application provides a method for obtaining annual rent, which can be applied in the application environment of house rental. Figure 1 A schematic diagram of a process for obtaining annual rent according to an embodiment of the present application is shown as follows: Figure 1 As shown, a method for obtaining annual rent in the present application includes the following steps:
[0060] Step S101 is to obtain a payment ledger, which includes multiple ledger information, including payment time, rent start time, rent end time and payment amount, and the rent start time and rent end time both include year information and month information. For example, the payment ledger is shown in Table 1, where a horizontal set of data (for example, the payment month is 2024-01, the rent start time is 2024-01, the rent end time is 2025-06, and the payment amount is 1500) is a ledger information.
[0061] Table 1:
[0062] Payment month Rental start time Lease expiration date Payment amount (RMB) 2024-01 2024-01 2025-06 1500 2026-01 2025-07 2026-12 1500
[0063] Step S102 is to determine the number of months covered by the first rent in the payment ledger according to the rent start time and the rent end time. Specifically, the rent start time includes the rent start year and the rent start month, and the rent end time includes the rent end year and the rent end month. Determining the number of months covered by the first rent in the payment ledger according to the rent start time and the rent end time includes: the number of months covered by the first rent = (rent end year - rent start year) * 12 + (rent end month - rent start month) + 1.
[0064] As shown in Table 1, the number of months covered by the first rent = (2025-2024)*12+(6-1)+1=17 months.
[0065] Step S103 is to determine all the years covered by the payment ledger according to the rent start time and the rent end time. Specifically, determining all the years covered by the payment ledger according to the rent start time and the rent end time includes: determining all the years covered in the payment ledger according to the minimum value of the start time and the maximum value of the rent end time.
[0066] As shown in Table 1, all the years covered in the payment ledger are 2024, 2025 and 2026.
[0067] Step S104 is to set any year among all the years as the year to be tested, and determine the number of months covered by the second rent for the year to be tested in each ledger information according to the year to be tested, the rent start time and the rent end time in each ledger information.
[0068] According to a specific implementation method, the second rent coverage months of the year to be tested in each ledger information are determined according to the year to be tested, the rent start time and the rent end time in each ledger information, including: if the start month of the year to be tested is greater than the rent end time, or the end month of the year to be tested is less than the rent start time, then the second rent coverage months of the year to be tested is zero; if the start month of the year to be tested is between the rent start time and the rent end time, and the end month of the year to be tested is greater than the rent end time, then the second rent coverage months of the year to be tested is: second rent coverage months = (rent end time The second rent coverage number of months for the year to be tested is: (year to be tested - year of rent start time)*12+(12-month of rent start time)+1; if the end month of the year to be tested is between the rent start time and the rent end time, and the start month of the year to be tested is less than the rent start time, then the second rent coverage number of months for the year to be tested is: the second rent coverage number of months = (year to be tested - year of rent start time)*12+(12-month of rent start time)+1; if the start month and end month of the year to be tested are both between the rent start time and the rent end time, then the second rent coverage number of months for the year to be tested is 12; the start month is January and the end month is December.
[0069] Step S105 is to determine the annual rent of the test year according to the payment amount, the number of months covered by the first rent and the number of months covered by the second rent.
[0070] According to a specific implementation, the determination of the annual rent for the year to be tested based on the payment amount, the number of months covered by the first rent, and the number of months covered by the second rent includes: determining the sub-rent for the year to be tested corresponding to the ledger information based on the payment amount, the number of months covered by the first rent, and the number of months covered by the second rent in each ledger information; summing the sub-rents for each ledger information to obtain the annual rent for the year to be tested. The annual rent for the year to be tested = ∑ [payment amount / (number of months covered by the first rent)*number of months covered by the second rent].
[0071] The present invention uses the relationship between the coverage period of the payment account in the lease contract and the statistical year to calculate the annual rent according to the corresponding ratio, so that the annual rent statistics are more in line with the actual situation, and the corresponding annual rent curve is also smoother, so as to achieve efficient and accurate annual rent. The lease contract is a signed contract for stipulating the rights and obligations of the lessor and the lessee.
[0072] The present invention also provides a specific embodiment. Figure 2 The flowchart of the embodiment of the present application is schematically shown as follows: Figure 2 As shown, the annual rent of a lease contract includes: calculating all years covered by the coverage period in the payment ledger of the lease contract.
[0073] For example, the set of years for the annual rent of the lease contract in Table 1 is 2024, 2025, and 2026; each year is cycled from low to high; and the annual rent for each year is calculated using the annual rent calculation formula.
[0074] Specifically, for each payment account, calculate the rent belonging to the year XXXX, and then sum them up. The number of months in the year XXXX covered by the rent is divided into the following situations:
[0075] If the year is outside the coverage period of the ledger, that is: 01 of XXXX> the rent end time, or December of XXXX< the rent start time, then: the number of months in the rent coverage period in XXXX = 0.
[0076] If December of XXXX is outside the coverage period of the ledger and January of XXXX is within the coverage period of the ledger, that is, December of XXXX > the rent expiration time, and January of XXXX >= the rent start time, then: the number of months in the rent coverage period in XXXX = (year of the rent expiration time - XXXX)*12+(month of the rent expiration time - 1)+1.
[0077] If December of XXXX is within the coverage period of the ledger, and January of XXXX is outside the coverage period of the ledger, that is, December of XXXX <= the rent end time, and January of XXXX < the rent start time, then: the number of months in the rent coverage period in XXXX = (XXXX-the year of the rent start time)*12+(12-the month of the rent start time)+1.
[0078] If December XXXX is within the coverage period of the ledger and January XXXX is within the coverage period of the ledger, that is, December XXXX <= rental end time and January XXXX >= rental start time. Then: the number of months in the rental coverage period of XXXX = 12.
[0079] like Figure 3 As shown, for the payment ledger in Table 1, the annual rent for Lease Contract B in 2024, 2025, and 2016 is calculated as follows:
[0080] 2024 rent = (12 / 15) x 1500 = 1000;
[0081] Rent in 2025 = (((15-12) / 15) x 1500) + (((15-12) / 15) x 1500) = 1000;
[0082] Rent in 2026 = (12 / 15) x 1500 = 1000.
[0083] In summary, there are annual rents in 2024, 2025 and 2026. The annual rents calculated according to the present invention are more realistic, and the curve of the calculated annual rents is also smoother.
[0084] According to the above annual rent, after being summarized according to the contract and year, an intermediate table of the report is formed, which can be used for single-year or multi-year annual rent inquiries. Based on the annual rent and the leased area of the lease contract, a method for quantitatively measuring the rental cost can be obtained: annual rent unit price = annual rent / lease area (yuan / ㎡). According to the annual rent unit price, a horizontal comparison of the rental costs of different houses can be made; or a vertical comparison of different years for the same house can be made. This application adds a rental area factor on the basis of the annual rent calculation method in this article, so that the rental cost can be quantified more accurately.
[0085] On the other hand, the present application also discloses a device for obtaining annual rent, which includes: an acquisition module, used to obtain a payment ledger, the payment ledger includes multiple ledger information, the ledger information includes payment time, rent start time, rent end time and payment amount, the rent start time and rent end time both include year information and month information; a first processing module, used to determine the number of months covered by the first rent in the payment ledger according to the rent start time and rent end time; a second processing module, used to determine all years covered by the payment ledger according to the rent start time and rent end time; a third processing module, used to set any year among all the years as the year to be tested, and determine the number of months covered by the second rent for the year to be tested in each ledger information according to the year to be tested, the rent start time and the rent end time in each ledger information; a fourth processing module, used to determine the annual rent of the year to be tested according to the payment amount, the number of months covered by the first rent and the number of months covered by the second rent.
[0086] Specifically, the rent start time includes the rent start year and the rent start month, and the rent end time includes the rent end year and the rent end month; the method of determining the number of months covered by the first rent in the payment ledger based on the rent start time and the rent end time includes: the number of months covered by the first rent = (rent end year - rent start year) * 12 + (rent end month - rent start month) + 1. The method of determining all years covered by the payment ledger based on the rent start time and the rent end time includes: determining all years covered in the payment ledger based on the minimum value of the start time and the maximum value of the rent end time. The method of determining the number of months covered by the second rent for the year to be tested in each ledger information according to the year to be tested, the rent start time and the rent end time in each ledger information includes: if the start month of the year to be tested is greater than the rent end time, or the end month of the year to be tested is less than the rent start time, then the number of months covered by the second rent for the year to be tested is zero; if the start month of the year to be tested is between the rent start time and the rent end time, and the end month of the year to be tested is greater than the rent end time, then the number of months covered by the second rent for the year to be tested is: the number of months covered by the second rent = (the year of the rent end time - the year to be tested); Year)*12+(month of rent termination time-1)+1; if the termination month of the year to be tested is between the rent start time and the rent termination time, and the starting month of the year to be tested is less than the rent start time, then the number of months covered by the second rent for the year to be tested is: the number of months covered by the second rent = (year to be tested-year of rent start time)*12+(12-month of rent start time)+1; if the starting month and the ending month of the year to be tested are both between the rent start time and the rent termination time, then the number of months covered by the second rent for the year to be tested is 12; the starting month is January and the ending month is December.
[0087] A method for obtaining annual rent of the present application includes: obtaining a payment ledger, the payment ledger includes multiple ledger information, the ledger information includes payment time, rent start time, rent end time and payment amount, the rent start time and rent end time both include year information and month information; determine the number of months covered by the first rent in the payment ledger according to the rent start time and rent end time; determine all years covered by the payment ledger according to the rent start time and rent end time; set any year among all the years as the year to be tested, determine the number of months covered by the second rent in each ledger information according to the year to be tested, the rent start time and rent end time in each ledger information; determine the annual rent of the year to be tested according to the payment amount, the number of months covered by the first rent and the number of months covered by the second rent. The present invention uses the relationship between the coverage period of the payment ledger on the lease contract and the statistical year, and calculates the annual rent according to the corresponding ratio, so that the annual rent statistics are more in line with the actual situation, and the corresponding annual rent curve is also smoother, so as to achieve efficient and accurate annual rent acquisition.
[0088] An embodiment of the present application provides a storage medium on which a program is stored. When the program is executed by a processor, the method for obtaining annual rent is implemented.
[0089] An embodiment of the present application provides a processor, which is used to run a program, wherein the program executes the above-mentioned method for obtaining annual rent when running.
[0090] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05 and a memory (not shown in the figure) connected through a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A06. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor A01, a method for product recommendation is implemented. The display screen A04 of the computer device can be a liquid crystal display or an electronic ink display, and the input device A05 of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0091] An embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the method for obtaining annual rent according to any embodiment of the present application is implemented.
[0092] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the method for obtaining annual rent according to any embodiment of the present invention.
[0093] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0094] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0097] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0098] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0099] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0100] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0101] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for obtaining annual rent, characterized in that: The method includes: Obtain a payment ledger, the payment ledger including multiple ledger information, the ledger information including payment time, rent start time, rent end time and payment amount, the rent start time and rent end time both including year information and month information; Determine the number of months covered by the first rent in the payment ledger according to the rent start time and rent end time; Determine all the years covered by the payment ledger based on the rent start time and rent end time; Set any one of all the years as the year to be tested, and determine the number of months covered by the second rent of the year to be tested in each ledger information according to the year to be tested, the rent start time and the rent end time in each ledger information; The annual rent for the test year is determined according to the payment amount, the number of months covered by the first rent, and the number of months covered by the second rent.
2. The method according to claim 1, characterized in that The rent start time includes the rent start year and the rent start month, and the rent end time includes the rent end year and the rent end month; The method of determining the number of months covered by the first rent in the payment ledger according to the rent start time and the rent end time includes: the number of months covered by the first rent = (rent end year - rent start year) * 12 + (rent end month - rent start month) + 1.
3. The method according to claim 1, characterized in that All years covered by the payment ledger determined according to the rent start time and rent end time include: All years covered in the payment ledger are determined based on the minimum value of the starting time and the maximum value of the rental end time.
4. The method according to claim 1, characterized in that: The method of determining the number of months covered by the second rent for the year to be tested in each ledger information according to the year to be tested, the rent start time and the rent end time in each ledger information includes: If the starting month of the year to be tested is greater than the end time of the rent, or the end month of the year to be tested is less than the starting time of the rent, then the number of months covered by the second rent of the year to be tested is zero; If the starting month of the year to be tested is between the rent starting time and the rent ending time, and the ending month of the year to be tested is greater than the rent ending time, then the number of months covered by the second rent of the year to be tested is: the number of months covered by the second rent = (year of the rent ending time - year to be tested) * 12 + (month of the rent ending time - 1) + 1; If the end month of the year to be tested is between the rent start time and the rent end time, and the start month of the year to be tested is less than the rent start time, then the number of months covered by the second rent for the year to be tested is: the number of months covered by the second rent = (year to be tested - year of rent start time) * 12 + (12 - month of rent start time) + 1; If the starting month and ending month of the year to be tested are both between the rent starting time and the rent ending time, the number of months covered by the second rent of the year to be tested is 12; The starting month is January, and the ending month is December.
5. The method according to claim 1, characterized in that The determining of the annual rent for the test year according to the payment amount, the number of months covered by the first rent, and the number of months covered by the second rent includes: Determine the rent for the year to be tested corresponding to the ledger information according to the payment amount, the number of months covered by the first rent, and the number of months covered by the second rent in each ledger information; The rent of each ledger information is summed up to obtain the annual rent of the year to be tested.
6. The method according to claim 5, characterized in that The annual rent of the year to be tested = ∑ [payment amount / (number of months covered by the first rent)*number of months covered by the second rent].
7. A device for obtaining annual rent, characterized in that: The device includes: An acquisition module is used to acquire a payment ledger, wherein the payment ledger includes multiple ledger information, wherein the ledger information includes payment time, rent start time, rent end time and payment amount, wherein the rent start time and rent end time both include year information and month information; A first processing module, used to determine the number of months covered by the first rent in the payment ledger according to the rent start time and rent end time; The second processing module is used to determine all years covered by the payment ledger according to the rent start time and rent end time; The third processing module is used to set any year among all the years as the year to be tested, and determine the number of months covered by the second rent of the year to be tested in each ledger information according to the year to be tested, the rent start time and the rent end time in each ledger information; The fourth processing module is used to determine the annual rent of the test year according to the payment amount, the number of months covered by the first rent and the number of months covered by the second rent.
8. The device according to claim 7, characterized in that The rent start time includes the rent start year and the rent start month, and the rent end time includes the rent end year and the rent end month; The method of determining the number of months covered by the first rent in the payment ledger according to the rent start time and the rent end time includes: the number of months covered by the first rent = (rent end year - rent start year) * 12 + (rent end month - rent start month) + 1.
9. The device according to claim 7, characterized in that All years covered by the payment ledger determined according to the rent start time and rent end time include: All years covered in the payment ledger are determined based on the minimum value of the starting time and the maximum value of the rental end time.
10. The device according to claim 7, characterized in that The method of determining the number of months covered by the second rent for the year to be tested in each ledger information according to the year to be tested, the rent start time and the rent end time in each ledger information includes: If the starting month of the year to be tested is greater than the end time of the rent, or the end month of the year to be tested is less than the starting time of the rent, then the number of months covered by the second rent of the year to be tested is zero; If the starting month of the year to be tested is between the rent starting time and the rent ending time, and the ending month of the year to be tested is greater than the rent ending time, then the number of months covered by the second rent of the year to be tested is: the number of months covered by the second rent = (year of the rent ending time - year to be tested) * 12 + (month of the rent ending time - 1) + 1; If the end month of the year to be tested is between the rent start time and the rent end time, and the start month of the year to be tested is less than the rent start time, then the number of months covered by the second rent for the year to be tested is: the number of months covered by the second rent = (year to be tested - year of rent start time) * 12 + (12 - month of rent start time) + 1; If the starting month and ending month of the year to be tested are both between the rent starting time and the rent ending time, the number of months covered by the second rent of the year to be tested is 12; The starting month is January, and the ending month is December.
11. The device according to claim 7, characterized in that The determining of the annual rent for the test year according to the payment amount, the number of months covered by the first rent, and the number of months covered by the second rent includes: Determine the rent for the year to be tested corresponding to the ledger information according to the payment amount, the number of months covered by the first rent, and the number of months covered by the second rent in each ledger information; The rent of each ledger information is summed up to obtain the annual rent of the year to be tested.
12. The device according to claim 11, characterized in that The annual rent of the year to be tested = ∑ [payment amount / (number of months covered by the first rent)*number of months covered by the second rent].
13. A processor, characterized in that: The method is configured to execute the method for obtaining annual rent according to any one of claims 1 to 6.
14. A machine-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor is configured to execute the method for obtaining annual rent according to any one of claims 1 to 6.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the method for obtaining annual rent according to any one of claims 1 to 6.
