Data consistency processing method and device in real estate sales system

By building the redis service module in the real estate sales system, the data version number is backed up and managed in real time, the data inconsistency is solved during multiple clients access and modification in the system, and the data version is effectively checksum update is achieved, ensuring the consistency and integrity of the data.

CN119583151APending Publication Date: 2025-03-07河南鑫智享电子科技有限公司北京分公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411697321.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

Existing real estate sales systems are prone to inconsistency in data access and modifications when multiple clients access and modify, especially when the two modification times are close, which may lead to data version conflicts, resulting in the latter modification overriding the previous modification.

Method used

The redis service module is built in the real estate sales system for real-time backup and management of data version numbers. When the client accesses or modifys data, the redis service module is used to checksum update the data version number to ensure data consistency.

Benefits of technology

By backing up and managing data version numbers in real time, data version conflicts are avoided, data consistency in the system is ensured, and data loss and inconsistency problems caused by version conflicts are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583151A_ABST
    Figure CN119583151A_ABST
Patent Text Reader

Abstract

The invention discloses a data consistency processing method and device in a real estate sales system, a redis service module is combined in the system, and a backup version number of target data is stored by using the redis service module in advance, and the method comprises the following steps: when a first client accesses the target data, the first client stores the backup version number of the target data; providing the data content and the first version number of the target data for the first client; the first version number is equal to a backup version number at a first access moment; when the first client modifies the data content of the target data and submits the modified target data to the system at a first submission moment, verifying the first version number by using the backup version number; and if the verification is passed, storing the modified target data, and updating the backup version number.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data consistency processing method and device in a real estate sales system. Background Art

[0002] The existing real estate sales system often faces many clients, and each client has certain access and modification permissions. When two modification times are close, data inconsistency will occur in the system.

[0003] For example, two clients may access the information of a room at the same time and modify the data in close time. In this case, according to the existing data management mechanism, the two modifications will lead to version conflicts in the data, making it very likely that the latter modification will overwrite the previous modification. This is the so-called data inconsistency. Summary of the invention

[0004] The present invention provides a data consistency processing method and device in a real estate sales system, wherein a redis service module is built into the system to perform data version management to solve the problem of data inconsistency.

[0005] In a first aspect, the present invention provides a data consistency processing method in a real estate sales system, wherein the system is combined with a redis service module, and the redis service module is used in advance to save a backup version number of target data, including:

[0006] When a first client accesses the target data, providing the first client with data content and a first version number of the target data; the first version number is equal to the backup version number at the first access time;

[0007] When the first client modifies the data content of the target data and submits the modified target data to the system at the first submission time, the first version number is verified using the backup version number;

[0008] If the verification passes, the modified target data is saved and the backup version number is updated.

[0009] Preferably, the method of using the redis service module to save the backup version number of the target data includes:

[0010] The data number of the target data is backed up as a key value in the redis data structure, and the latest version number of the target data is backed up as a value in the redis data structure.

[0011] Preferably, it also includes:

[0012] If the verification fails, the modified target data is refused to be saved.

[0013] Preferably, after refusing to save the modified target data, the method further includes:

[0014] The data content and a second version number of the target data are provided to the first client, where the second version number is equal to the backup version number at the second access time.

[0015] Preferably, it also includes:

[0016] When the second client accesses the target data, providing the data content and the first version number of the target data to the second client;

[0017] When the second client submits the modified target data to the system at the second submission time and passes the verification, the backup version number is updated;

[0018] The second submission time is between the first access time and the first submission time;

[0019] The updated backup version number is equal to the second version number.

[0020] Preferably, the version number is the TS value in the redis data structure.

[0021] Preferably, the first version number, the second version number and the backup version number are all hidden fields.

[0022] In a second aspect, the present invention provides a data consistency processing device in a real estate sales system, the device comprising:

[0023] Redis service module, used to save the backup version number of the target data in advance;

[0024] A data providing module, configured to provide the first client with data content and a first version number of the target data when the first client accesses the target data; the first version number is equal to the backup version number at the first access time;

[0025] a data verification module, configured to modify the data content of the target data on the first client and verify the first version number using the backup version number when submitting the modified target data to the system at a first submission time;

[0026] The data editing module is used to save the modified target data and update the backup version number when the verification passes.

[0027] In a third aspect, the present invention provides a readable medium, comprising execution instructions. When a processor of an electronic device executes the execution instructions, the electronic device executes any method described in the first aspect.

[0028] In a fourth aspect, the present invention provides an electronic device, comprising a processor and a memory storing execution instructions, wherein when the processor executes the execution instructions stored in the memory, the processor executes any method described in the first aspect.

[0029] The present invention provides a data consistency processing method and device in a real estate sales system; the latest data version number is backed up in real time by a redis service module, and the version number is verified when the modification is submitted on the client side. If there is a data version conflict, the verification fails, thereby avoiding the problem of data inconsistency in the system.

[0030] The further effects of the above-mentioned non-conventional preferred manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the existing technical solutions, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0032] Figure 1 A schematic flow chart of a data consistency processing method in a real estate sales system provided by an embodiment of the present invention;

[0033] Figure 2 A schematic diagram of a process of updating a backup version number by a second client in a data consistency processing method in a real estate sales system provided by an embodiment of the present invention;

[0034] Figure 3 A schematic diagram of a process flow of a first client verification failure in a data consistency processing method in a real estate sales system provided by an embodiment of the present invention;

[0035] Figure 4 A schematic diagram of the structure of a data consistency processing device in a real estate sales system provided by an embodiment of the present invention;

[0036] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] The existing real estate sales system often faces many clients, and each client has certain access and modification permissions. When two modification times are close, data inconsistency will occur in the system.

[0039] When two clients access the information of a room at the same time and modify the data in close time, according to the existing data management mechanism, the two modifications will lead to version conflicts in the data.

[0040] Assume that the target data is the area information of room 801, the specific data content is: building area 100 square meters, suite area 90 square meters, version number 0001. Client A and client B access the target data at a relatively close time and obtain its data content and version number.

[0041] Client A then modified the data content, changed the building area to 110 square meters, and submitted it. The version number in the system was updated to 0002.

[0042] After client A, client B also made changes, changing the floor area to 95 square meters, and submitted it. The version number in the system was updated to 0003.

[0043] In this case, the correct data content should be: building area 110 square meters, interior area 95 square meters, version number 0003. That is, the changes made by both clients are saved.

[0044] However, if the operation time of the two is close (the target data obtained by client B is still the earlier version, not the modified version by client A), version conflict is very likely to occur, resulting in client A's operation being overwritten by client B. The actual saved data content is: building area 100 square meters, suite area 95 square meters, version number 0003. That is, only the modification of client B is retained, and the modification of client A is lost. The so-called data inconsistency is caused by this.

[0045] In view of this, the present invention provides a data consistency processing method in a real estate sales system. Figure 1The figure shows a specific embodiment of the data consistency processing method in the real estate sales system provided by the present invention. In this embodiment, the system can be combined with a redis service module, and the redis service is used to back up and update the version number in real time, thereby avoiding consistency problems caused by data version conflicts.

[0046] Specifically, the redis service module can be used to save the backup version number of the target data in advance. That is, according to the key-value data structure characteristics of redis, the data number of the target data can be backed up as the key value in the redis data structure, and the latest version number of the target data can be backed up as the value in the redis data structure.

[0047] Assume that the target data is the area information of room 801, and the initial data content is: building area 100 square meters, interior area 90 square meters. The initial version number is 0001. At this time, it can be backed up in redis as <801-0001>. Among them, 801 represents the data number, and 0001 represents the latest version number. In this embodiment, the version number can specifically be a TS value (ThreadSafety, i.e., thread safety).

[0048] In this embodiment, the method may specifically include the following steps:

[0049] Step 101: When a first client accesses the target data, the data content and a first version number of the target data are provided to the first client; the first version number is equal to the backup version number at the first access time.

[0050] Under normal circumstances, when the first client accesses the target data, the data content and the first version number of the target data are obtained. The first version number can be the version number of the latest version saved in the system. Its value should be consistent with the backup version number in redis, that is, the first version number is equal to the backup version number at the first access time. The first access time refers to the time when the first client accesses the target data this time.

[0051] It should also be noted that when the user obtains a form presenting the target data, the version number can be used as a hidden field in the form.

[0052] Step 102: When the first client modifies the data content of the target data and submits the modified target data to the system at a first submission time, the backup version number is used to verify the first version number.

[0053] The first client can modify the data content of the target data and submit the modified target data to the system at the first submission time, so that the system saves the data to complete the modification.

[0054] At this point, the system needs to use the backup version number in redis to verify the first version number to avoid potential data inconsistency risks.

[0055] Step 103: If the verification passes, the modified target data is saved and the backup version number is updated.

[0056] The first version number in the form obtained by the first client will not change, and it will always be equal to the backup version number at the first access time. Under normal circumstances, the backup version number in redis will not change during the period from the first access time to the first submission time (because this period is usually not long, if no one else edits the target data during this period, the backup version number will not change).

[0057] If the backup version number does not change compared to the first access time, the first version number and the backup version number must be consistent, which means that the verification is passed. After the verification is passed, the system can save the modified target data and update the version number. For example, update the version number from 0001 to 0002. In redis, the backup version number must also be updated synchronously, that is, updated to <801-0002>. Based on the performance characteristics of the redis service and sales system, the real-time update can reach milliseconds.

[0058] It should also be noted that the prerequisite for the above verification to pass is that no one else edits the target data during the period from the first access time to the first submission time, and the backup version number does not change. On the contrary, if other clients edit the target data during this period, the backup version number will change, which will cause the verification to fail.

[0059] That is Figure 2 As shown:

[0060] Step 201: When a second client accesses the target data, the data content and a first version number of the target data are provided to the second client.

[0061] Step 202: When the second client submits the modified target data to the system at the second submission time and passes the verification, the backup version number is updated.

[0062] The second submission time is between the first access time and the first submission time, and the updated backup version number is equal to the second version number.

[0063] The so-called second client is another client different from the first client. In fact, for the system, all clients are considered equal. The second client is the same as the first client and has the authority to access the target data and edit and modify it. And after any client modifies the target data, the version number needs to be updated.

[0064] exist Figure 2 In the steps shown, the second client and the first client accessed the target data at a similar time (the so-called similar time means that the version number did not change during this period of time), so the version number provided by the system to the second client is still the first version number.

[0065] Between the first access time and the first submission time, the second client submitted the modified target data to the system, that is, it edited and modified the data before the first client (at this time, the first client is still browsing or modifying the target data, but has not yet initiated submission). After the second client completes the data modification, the backup version number is updated from the first version number to the second version number. That is, it can be considered that after the second submission time, the backup version number is updated from <801-0001> to <801-0002>.

[0066] At this time, the version number in the form obtained by the first client is still the old version number, that is, the first version number. The first version number is inconsistent with the backup version number at this time, which will cause the first client to fail the verification. So for the subsequent process of the first client, please refer to Figure 3 As shown:

[0067] Step 301: If the verification fails, the modified target data is refused to be saved.

[0068] Step 302: Provide the first client with the data content and a second version number of the target data, where the second version number is equal to the backup version number at the second access time.

[0069] That is to say, when the verification fails, the system will refuse to save the modification submitted by the first client, thereby avoiding data inconsistency and solving the problem of data version conflict.

[0070] Furthermore, the target data can be provided to the first client again. The version number carried in the form of the new target data will be the latest version number, that is, the backup version number at this time (the value is equal to the second version number). The first client re-modifies the data and submits it again, and it can pass the verification.

[0071] It can be seen from the above technical solution that the beneficial effect of the method described in this embodiment is: using the redis service module to back up the latest data version number in real time, and verifying the version number when submitting modifications on the client. If there is a data version conflict, the verification fails, thereby avoiding data inconsistency problems in the system.

[0072] like Figure 4 FIG. 1 is a specific embodiment of a data consistency processing device in a real estate sales system according to the present invention. The device described in this embodiment is used to perform Figures 1 to 3 The physical device of the method. Its technical solution is essentially consistent with the above embodiment, and the corresponding description in the above embodiment is also applicable to this embodiment. The device in this embodiment includes:

[0073] The redis service module 401 is used to save the backup version number of the target data in advance.

[0074] The data providing module 402 is used to provide the data content and a first version number of the target data to the first client when the first client accesses the target data; the first version number is equal to the backup version number at the first access time.

[0075] The data verification module 403 is used to modify the data content of the target data at the first client and verify the first version number using the backup version number when submitting the modified target data to the system at a first submission time.

[0076] The data editing module 404 is used to save the modified target data and update the backup version number when the verification passes.

[0077] Figure 5 : is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.

[0078] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0079] The memory is used to store execution instructions. Specifically, the execution instructions are computer programs that can be executed. The memory may include internal memory and non-volatile memory, and provides execution instructions and data to the processor.

[0080] In a possible implementation, the processor reads the corresponding execution instruction from the non-volatile memory into the memory and then runs it, and can also obtain the corresponding execution instruction from other devices to form a data consistency processing device in the real estate sales system at the logical level. The processor executes the execution instruction stored in the memory to implement a data consistency processing method in a real estate sales system provided in any embodiment of the present invention through the execution of the execution instruction.

[0081] As described above, the present invention Figure 4The method performed by a data consistency processing device in a real estate sales system provided in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0082] The steps of the method disclosed in the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0083] The embodiment of the present invention further provides a readable medium, which stores an execution instruction. When the stored execution instruction is executed by a processor of an electronic device, the electronic device can execute a data consistency processing method in a real estate sales system provided in any embodiment of the present invention, and is specifically used to execute the following Figure 1-Figure 3 The method shown.

[0084] The electronic device described in the above embodiments may be a computer.

[0085] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods or computer program products. Therefore, the present invention may be implemented in the form of a complete hardware embodiment, a complete software embodiment, or a combination of software and hardware.

[0086] The various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0087] 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.

[0088] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A data consistency processing method in a real estate sales system, characterized in that: The system combines a redis service module and uses the redis service module to save the backup version number of the target data in advance, including: When a first client accesses the target data, providing the first client with data content and a first version number of the target data; the first version number is equal to the backup version number at the first access time; When the first client modifies the data content of the target data and submits the modified target data to the system at the first submission time, the first version number is verified using the backup version number; If the verification passes, the modified target data is saved and the backup version number is updated.

2. The method according to claim 1, characterized in that: The backup version number of the target data saved by the redis service module includes: The data number of the target data is backed up as a key value in the redis data structure, and the latest version number of the target data is backed up as a value in the redis data structure.

3. The method according to claim 1, characterized in that: Also includes: If the verification fails, the modified target data is refused to be saved.

4. The method according to claim 3, characterized in that: Refusing to save the modified target data also includes: The data content and a second version number of the target data are provided to the first client, where the second version number is equal to the backup version number at the second access time.

5. The method according to claim 3, characterized in that: Also includes: When the second client accesses the target data, providing the data content and the first version number of the target data to the second client; When the second client submits the modified target data to the system at the second submission time and passes the verification, the backup version number is updated; The second submission time is between the first access time and the first submission time; The updated backup version number is equal to the second version number.

6. The method according to any one of claims 1 to 5, characterized in that: The version number is the TS value in the redis data structure.

7. The method according to any one of claims 1 to 5, characterized in that: The first version number, the second version number and the backup version number are all hidden fields.

8. A data consistency processing device in a real estate sales system, characterized in that: The device comprises: Redis service module, used to save the backup version number of the target data in advance; A data providing module, configured to provide the first client with data content and a first version number of the target data when the first client accesses the target data; the first version number is equal to the backup version number at the first access time; a data verification module, configured to modify the data content of the target data on the first client and verify the first version number using the backup version number when submitting the modified target data to the system at a first submission time; The data editing module is used to save the modified target data and update the backup version number when the verification passes.

9. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the data consistency processing method in the real estate sales system described in any one of claims 1 to 7.

10. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the data consistency processing method in the real estate sales system described in any one of claims 1-7.