Server, data processing method and apparatus

CN116049163BActive Publication Date: 2026-10-09BEIJING SHANGYIN MICRO CORE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210968819.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2022-08-05
Filing Date
2022-08-12
Publication Date
2026-10-09
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

[0005]本申请提供了一种服务器、数据处理方法及装置,目的在于解决如何提高数据处理的效率以及准确性的问题

Benefits of technology

[0036] The server, data processing method, and apparatus described in this application achieve data state switching based on switching conditions through a state machine, update the value of data items through a generation module, and store data in different states through a storage module. This enables the decoupling of data state switching, value updating, and storage, and allows for the storage of data in various states and values, thus laying the foundation for improving the efficiency of data storage and retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116049163B_ABST
    Figure CN116049163B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a server, a data processing method and device, and the switching of the data state is realized based on the switching condition through the state machine, the value of the data item is updated through the generating module, the data in different states is stored through the storing module, the decoupling of the data state switching, the value updating and the storing can be realized, and the storage of the data in various states and values can be realized, so that the foundation for improving the storage and query efficiency of the data is laid.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese Patent Application No. 202210937958.8, filed on August 5, 2022, entitled "Server, Data Processing Method and Apparatus", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of electronic information, and more particularly to a server, a data processing method, and an apparatus. Background Technology

[0003] In trade, the two parties are the buyer (the purchaser of goods or services) and the supplier (the provider of goods or services). A relationship exists between them, resulting in accounts payable from the buyer to the supplier. IOU data refers to data used to represent accounts payable.

[0004] With the development of computer technology, using computers for data storage and retrieval to improve efficiency has become a trend. However, the complexity of blank data is relatively high, and even when using computers for storage and retrieval, problems of low efficiency and low accuracy still exist. Summary of the Invention

[0005] This application provides a server, a data processing method, and an apparatus, with the aim of solving the problem of how to improve the efficiency and accuracy of data processing.

[0006] To achieve the above objectives, this application provides the following technical solution:

[0007] A server, comprising:

[0008] Generation module, state machine, and storage module;

[0009] The state machine is used to switch data from a first state to a second state based on the correspondence between the switching condition and the state after detecting the occurrence of a preset switching condition.

[0010] The generation module is used to update the value of the data item of the data in the second state based on the value of the data item of the data in the first state, wherein any data item includes a unique number;

[0011] The storage module is used to store data in different states, and the data includes the values ​​of preset data items.

[0012] Optionally, the number includes:

[0013] Information about the entity that created the data, creation time, serial number, and serial number;

[0014] The sequence number is a unique identifier for the data configuration created by the subject within a preset time period;

[0015] The serial number indicates the number of times the subject has changed.

[0016] Optionally, the generation module is used to update the values ​​of the data items in the second state based on the values ​​of the data items in the first state, including:

[0017] The generation module is specifically used to: when the data in the second state is not data obtained by splitting the data in the first state, if the subjects corresponding to the data in the first state and the data in the second state are different, and the first state and the second state belong to the same business, then the serial number in the number of the data in the second state is the serial number of the data in the first state plus a preset step size; when the data in the second state is data obtained by splitting the data in the first state, if the first state and the second state belong to the same business, then the serial number in the number of the data in the second state is the serial number of the data in the first state plus a preset step size.

[0018] Optionally, the generation module is used to update the values ​​of the data items in the second state based on the values ​​of the data items in the first state, and further includes:

[0019] The generation module is further configured to use the number of the data in the first state as the parent number of the data in the second state.

[0020] Optionally, the storage module is used to store data in different states, including:

[0021] The storage module is specifically used to store the data of the different states in a tree structure.

[0022] Optional, also includes:

[0023] The generation module is used to asynchronously synchronize the data generated by the cache module and transmit the data to the storage module.

[0024] A data processing system, comprising:

[0025] At least one client and the aforementioned server;

[0026] The client includes a triggering module for issuing instructions as state switching trigger conditions, and a querying module for sending query information to the server.

[0027] The server is used to transmit data as query results to the client.

[0028] A data processing method, comprising:

[0029] After detecting the occurrence of a preset switching condition, the data is switched from the first state to the second state according to the correspondence between the switching condition and the state.

[0030] Used to update the value of the data item in the second state based on the value of the data item in the first state, wherein each data item includes a unique number;

[0031] The system stores data in different states, including the values ​​of preset data items.

[0032] An electronic device, comprising a processor and a memory;

[0033] The memory is used to store programs;

[0034] The processor is used to run the program to implement the above-described data processing method.

[0035] A readable storage medium having program code stored thereon, wherein the program code, when executed, implements the above-described data processing method.

[0036] The server, data processing method, and apparatus described in this application achieve data state switching based on switching conditions through a state machine, update the value of data items through a generation module, and store data in different states through a storage module. This enables the decoupling of data state switching, value updating, and storage, and allows for the storage of data in various states and values, thus laying the foundation for improving the efficiency of data storage and retrieval. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a structural example of a data processing system disclosed in an embodiment of this application;

[0039] Figure 2 This is a structural example diagram of the server disclosed in an embodiment of this application;

[0040] Figure 3 This is a flowchart of the data processing method disclosed in the embodiments of this application;

[0041] Figure 4 This is an example diagram of a service state switching disclosed in an embodiment of this application;

[0042] Figure 5 This is an example diagram of a tree-shaped storage structure disclosed in an embodiment of this application;

[0043] Figure 6 This is an example diagram of another type of business state switching disclosed in the embodiments of this application. Detailed Implementation

[0044] The data processing method and apparatus disclosed in this application are used to process data including the following data items:

[0045] Data item 1, the state of the data (which can be simply referred to as the state of the data): can be pre-configured according to specific application scenarios. The values ​​of the data items corresponding to different states (i.e., the data items representing different states) can also be pre-configured.

[0046] Data item 2, the subject corresponding to the data: The subject is the enterprise or user associated with the data. Different states of the data can correspond to different subjects. The correspondence between the state and the subject can be pre-configured according to the specific application scenario.

[0047] Data item 3, data number: used to uniquely identify a data item.

[0048] Data item 4, Parent Column Number: The number of the parent column data. Parent column data refers to the data in the state before the current state change. That is, assuming the state represented by the data changes from the first state to the second state, the data in the first state is the parent column data of the data in the second state.

[0049] Data item 5: The content of the data.

[0050] An example of data with the above data items is blank bar data.

[0051] Understandably, because the data contains a large number of data items, even with the help of computers for storage and retrieval, there are still problems of low efficiency and low accuracy.

[0052] The data processing system and data processing method based on the data processing system disclosed in the following embodiments of this application improve the storage and setting of the above data, with the aim of improving the efficiency and accuracy of data processing.

[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0054] Figure 1A data processing system disclosed in this application includes a client and a server.

[0055] The number of clients can be one or multiple. Figure 1 In this example, we'll use two clients. Client A is the client used by company A to log in, and client B is the client used by company B to log in.

[0056] Any client includes both the processing terminal and the supervisory terminal. The processing terminal and the supervisory terminal can be configured together or separately; there is no limitation here.

[0057] like Figure 1 As shown, any handling terminal includes an initiation module and a first query module. Any supervisory terminal includes an approval module and a second query module. It is understood that the terms "first" and "second" used in the embodiments of this application are merely for distinction and do not imply any order, priority, or other similar meanings.

[0058] The initiation module and the review module are used to respond to user actions and issue instructions that serve as trigger conditions for the following state transitions. Therefore, the initiation module and the review module can be collectively referred to as the triggering module. The first query module and the second query module can be collectively referred to as the query module, which is used to query data from the server.

[0059] Figure 2 This is a schematic diagram of the server structure. The server includes: a cache module, a generation module, a state machine, and a storage module. Optionally, the storage module includes a data recording submodule and a data change recording submodule. Figure 2 (Not shown in the drawing).

[0060] The caching module uses a non-persistent, non-relational database. The storage module uses a persistent, relational database. Non-relational databases are inherently much faster to read and write than relational databases.

[0061] The following is about Figure 2 The functions of the server shown are explained in detail.

[0062] Figure 3 The data processing flow implemented for the server includes the following steps:

[0063] S31. Check if the switching conditions of each state of the state machine monitoring data have occurred. If yes, execute S32; otherwise, continue executing S31.

[0064] The correspondence between data status and switching conditions is pre-configured.

[0065] Understandably, the state machine pre-configures all possible states of the data, and the transitions between these states are triggered by pre-configured transition conditions. As mentioned earlier, each state of the data is represented by data item 1, so the state of the data is determined through data item 1 included in the data.

[0066] Taking blank data as an example, Table 1 shows the status of blank data and the business to which the status belongs:

[0067] Table 1

[0068]

[0069] Table 1 categorizes the white-label data into different states based on the business scenarios they represent. It's understandable that states within the same business can switch between each other, and states across different businesses can also switch between each other. The specific switching conditions and the correspondence between the switchable states can be configured as needed.

[0070] It should be noted that the left side of Table 1 includes the names of the various statuses displayed by the entity that created the white slip data, such as Company A, while the right side includes the names of the various statuses displayed by other entities, such as Company B, after the white slip data is created. In other words, statuses can be set separately for different entities, and for the same status, the status names of different entities can correspond to each other (meaning the same status but different names). For example, in the issuance-receipt business shown in Table 1, the status displayed by Company A as "Issued Pending Receipt" and the status displayed by Company B as "Pending Receipt" refer to the same status, only the names differ from the perspective of different entities.

[0071] Setting different status names for different subjects makes it easier to store data according to the subject and improves readability when the subject views the data.

[0072] It is understandable that Table 1 does not include the switching conditions for each state transition, which can be set as needed, and will not be elaborated here.

[0073] S32. After the state machine detects that a switching condition has occurred, it switches the data from the current first state to the second state according to the correspondence between the switching condition and the state.

[0074] It is understandable that the second state is a state obtained by transitioning from the current state, triggered by a switching condition. Both the first and second states are pre-configured states, such as those shown in Table 1.

[0075] It should be noted that because there is an initial state, such as "Pending Issuance" in Table 1, in this embodiment, the state before the initial state is defined as empty. That is, if the second state is the initial state, the first state is empty. The transition from empty to the initial state is triggered by pre-configured conditions.

[0076] S33. The cache module updates the value of the data item in the second state based on the value of the data item in the first state.

[0077] In this embodiment, a unique number is assigned to each piece of data to facilitate data management and querying.

[0078] The numbering specifically includes:

[0079] 1. Information about the entity that created the data, including but not limited to an identifier, as long as it can distinguish the entity from other entities, such as the English abbreviation of the company that issued the white slip data, SSJTCYE.

[0080] 2. Creation time. The creation time can be formatted as year, month, and day, for example: 20201022.

[0081] 3. Serial number: A unique identifier assigned to each entity's data configuration within a preset time period. For example, each blank receipt issued by Company A on a given day has a unique serial number, incrementing by 1 from the preset initial serial number. In this step, assuming Company A issues blank receipt data for the first time today, the cache module sends Company A a blank receipt with serial number 001.

[0082] 4. Serial Number. The serial number is used to indicate the number of times the subject has changed. For blank receipt data, the serial number increases by a preset step value, such as 1, for each change of creditor.

[0083] It is understood that the number of digits in the serial number can be pre-configured according to requirements. In this embodiment, the serial number is six digits. The initial serial number is 000000.

[0084] Each item in the above numbering can be separated by a preset separator, such as "-". For example, the number of the newly created white slip data by company A is: SSJTCYE-20201022-001-000000.

[0085] As can be seen, the above numbering system allows us to obtain information such as the data creator, creation time, and changes to the data creator, thus providing good readability and indicative value.

[0086] Understandably, the initial state of the data is newly created. Taking white slip data as an example, as shown in Table 1, the newly created example is pending issuance.

[0087] As mentioned earlier, in addition to the number, the data also includes other data items. An example of a newly created white bar data is shown in Table 2:

[0088] Table 2

[0089]

[0090] In Table 2, the data content uses the amount of the IOU as an example. The corresponding entity is represented by company A (simplified as A in Table 1), which holds the IOU, and the status of the IOU data is pending issuance.

[0091] Understandably, since this is newly created data, there is no parent data, therefore the parent data number is empty.

[0092] It is understood that the number is assigned by the cache module, but the values ​​of other data items can be assigned by the subject that created the data, as will be explained in the following examples.

[0093] It is understandable that the data in each state includes the above data items, and the values ​​of the data items may differ in different states. With the correspondence between states and data item values ​​pre-configured, the values ​​of the data items in the first and second states of the data can be determined respectively.

[0094] In this step, the specific method for updating the values ​​of the data items in the second state based on the values ​​of the data items in the first state is as follows:

[0095] 1. Except for the case where the second state is data obtained by splitting the data from the first state, if the data in the first state and the second state correspond to different entities, and the first state and the second state belong to the same business, then the serial number in the numbering of the data in the second state is the serial number of the data in the first state plus a preset step size. If the data in the first state and the second state correspond to the same entity, then the serial number remains unchanged.

[0096] However, when splitting into sub-strips, although the holder of the second state data is still the holder of the first state data (i.e., the parent strip data), the serial number in the second state data will still increase by the step size.

[0097] 2. Based on the definitions of the data items other than the serial number in the aforementioned numbering, since they all represent creation information, and the second state is not newly created, the value of the second state is the same as that of the first state.

[0098] 3. Use the data number of the first state as the parent data number of the second state.

[0099] 4. The values ​​of other data items besides the serial number and parent serial number in the second state can be determined according to the pre-configured settings.

[0100] Understandably, when the first state is empty, the values ​​of all data items in the data of the first state are empty. In this case, the generation module configures the values ​​of each data item for the newly created data according to preset rules (including but not limited to the aforementioned numbering setting rules).

[0101] In the blank bar data shown in Table 3, the first row of blank bar data is the second state of blank bar data obtained by converting the blank bar data shown in Table 2 as the first state. Because the main body remains unchanged, the serial number remains unchanged.

[0102] The second row of blank receipt data in Table 3 represents the data in the first state, as shown in Table 2, converted to the second state. The difference from the first row is the subject matter; under this subject, as can be seen from Table 1, the second state is exemplified by "pending signature."

[0103] Table 3

[0104]

[0105] As can be seen from Table 3, because the subject of the data, i.e. the holder, changed from A to B, the subject changed, and therefore the serial number changed from 000000 to 000001.

[0106] Since the subject, i.e. the holder, is B, the name of the state is displayed from B's perspective.

[0107] In the example of the white slip data, the monetary value, which is the content of the data, is pre-configured to be the same value in different states, so it does not change with the change of state.

[0108] S34. The cache module synchronizes data with the generation module asynchronously.

[0109] Because the storage space of the cache module is limited and the data is not persistently stored in the cache module, it is necessary to synchronize the data to the generation module.

[0110] Asynchronous mode refers to transmitting the number to the client and synchronizing data with the generation module at different times.

[0111] Assuming that the time perceived by the user is t0, the read / write time of the generation module is t1, and the read / write time of the cache module is t2, where t2<t1. By arranging the cache module with faster read / write speed in front of the generation module and enabling t0=t2, the read / write speed perceived by the user is accelerated. The data of the cache module and the generation module need to maintain relative consistency, that is, the data in the cache module eventually needs to be written into the generation module. If a synchronous solution is adopted, that is, after the cache module completes writing, the data is immediately written into the generation module and then returned to the user, this solution not only fails to reduce the read / write time difference between the two modules, but also increases the original read / write time of one module to that of two modules, that is, t0=t1+t2. Therefore, an asynchronous method needs to be adopted, that is, read / write operation is performed in the cache module first, and after returning the result to the user, the data is inserted into the generation module, which saves time while ensuring the data consistency between the cache module and the generation module.

[0112] S35: The generation module transmits the data in the second state to the storage module.

[0113] It can be understood that the data in the first state has been transmitted to the storage module, or is transmitted to the storage module together with the data in the second state, which is not limited herein.

[0114] S36: The storage module stores data in different states in a tree structure.

[0115] A tree structure is a data structure that includes root nodes, parent nodes and child nodes. Taking Figure 4 as an example, 00 is the root node, and it can be understood that the root node is the parent node of all other nodes except itself. Among other nodes except the root node, 01 is the parent node of 02 and 03, and 02 is the parent node of 04.

[0116] It can be understood that after the storage module receives the newly created blank ticket data shown in Table 3, it takes the newly created blank ticket data as the root node to generate a tree structure, and subsequent data obtained through changes to the root node are all stored under the root node.

[0117] In combination with the foregoing data items of the data, in this embodiment, data with an empty parent ticket number is used as the root node. Under the root node, the parent node of each piece of data is determined according to the parent ticket number of each piece of data, and each piece of data is stored as a child node of the corresponding parent node, thereby obtaining the tree structure.

[0118] Storing data in a tree structure is beneficial to improving data query efficiency.

[0119] It is understandable that, based on the data items in the above data, the client's query module can input information about the data items to the server to achieve the purpose of querying data on the server. In addition to the functions represented by the above steps, the server can also respond to the query information and output data as the query result to the client.

[0120] The following examples illustrate the above process by showing the state transitions in some of the business processes listed in Table 1:

[0121] I. Issuance and Receipt Services:

[0122] a1. The state machine detects that the condition for the white slip data to switch to the pending issuance state has occurred.

[0123] When a blank receipt is switched to the pending issuance status, a new blank receipt is created.

[0124] In this step, the condition for the blank slip data to switch to the pending issuance state is: the server's cache receives the blank slip issuance instruction transmitted by the initiating module of the handling terminal.

[0125] a2. The state machine switches the status of the white bar data to pending issuance.

[0126] a3. The cache module generates the number of the white slip data in the pending issuance status.

[0127] It is understandable that, since the pending issuance state is the initial transition state, the data items in the previous state all have empty values.

[0128] In this step, the numbering of the white slip data in the pending issuance status can be found in Table 2.

[0129] a4. The cache module receives white slip data in the pending issuance status.

[0130] It is important to emphasize that the caching module can transmit the ID of the blank slip data in the pending issuance status to the initiating module of the processing terminal. After the initiating module of the processing terminal fills in the values ​​of other data items in the blank slip data except for the ID and status name (to obtain the blank slip data as shown in Table 2), it transmits the blank slip data to the caching module.

[0131] It is understandable that a3 and a4 can be seen as specific implementations of S33.

[0132] a5. The cache module transmits the white slip data in the pending issuance status to the storage module and synchronizes it with the initiating module.

[0133] a6. The storage module stores the white slip data in the pending issuance status as the root node.

[0134] At this point, a blank receipt in the pending issuance status is stored in the server.

[0135] a7. The state machine detects that the condition for the white slip data to switch to the issuance pending receipt state has occurred.

[0136] In this embodiment, for ease of understanding, the name of the state is the name of the main perspective of the state after the switch.

[0137] The condition for switching the blank receipt data to the pending receipt status is: receiving an instruction from the supervisor's terminal that the blank receipt data to be issued has been approved.

[0138] a8. The state machine switches the status of the white slip data to "Issued but Pending Receipt".

[0139] a9. The cache module updates the values ​​of the data items of the pending-signature white slip data based on the values ​​of the data items of the pending-signature white slip data.

[0140] In this embodiment, the data of white slips in the pending receipt status can be found in Table 3.

[0141] a10. The cache module transmits the data of the white slips in the pending receipt status to the storage module and synchronizes with the initiating module.

[0142] a11. The storage module stores the data of the white slips to be issued and signed as sub-slip data of the white slips to be issued.

[0143] As shown in Table 1, in addition to the examples above, the issuance-receipt service also includes states such as rejection and withdrawal. The corresponding state transition and storage steps will not be detailed here; the transition logic for each state is as follows: Figure 5 As shown, based on Figure 5 Here are just some examples of data item values:

[0144] Figure 5 The values ​​of each data item for the white slip data that switched from the pending issuance status to the issuance pending receipt (i.e., issued) status are shown in Tables 2 and 3. The values ​​of each data item for the white slip data that switched from the issuance pending receipt (i.e., issued) status to the issued status are shown in Table 4.

[0145] Table 4

[0146]

[0147] Figure 5 The values ​​of each data item for the IOU data that switched from the pending issuance status to the issuance pending receipt status are shown in Tables 2 and 3. The values ​​of each data item for the IOU data that switched from the issuance pending receipt status to the withdrawn status are shown in Table 5.

[0148] Table 5

[0149]

[0150] Figure 5 The values ​​of each data item for the IOU data that switched from the pending issuance status to the issuance pending receipt status are shown in Tables 2 and 3. The values ​​of each data item for the IOU data that switched from the issuance pending receipt status to the supplier rejected status are shown in Table 6.

[0151] Table 6

[0152]

[0153] II. Transfer-Financing-Splitting Transactions:

[0154] Transfer and financing are the two main business states of IOU. Splitting can be embedded in transfer and financing to realize split transfer and split financing. When the approval is granted, at least one of split and transfer or split and financing is completed.

[0155] From the "received" status, you can switch to the transfer, financing, and splitting statuses, as detailed below. Figure 6 As shown.

[0156] The condition for switching from the "received" status to the "split application in progress" status is: receiving a split instruction from Enterprise B's handling terminal. Table 7 shows the white slip data for the "received" status (i.e., the "issued" status of Holder A) and the "split application in progress" status:

[0157] Table 7

[0158]

[0159] Referring to the diagram and Table 7, it should be noted that (holder B's) "accepted" status will switch to "split application in progress" status when a split instruction is triggered, "transfer application in progress" status when a transfer instruction is triggered, and "financing application in progress" status when a financing instruction is triggered.

[0160] The condition for switching from the split application status to the split status is: receiving a split approval instruction transmitted from the supervisor terminal of Enterprise B.

[0161] Table 8 shows the white bar data for when a split application changes from an in-process status to other statuses:

[0162] Table 8

[0163]

[0164] Combination Figure 6Regarding Table 8, it should be noted that in the split state, although the holder of the sub-strip remains the same, the serial number needs to be changed. That is, if the data in the second row of Table 8 is split into the data in the third and fourth rows, the serial number of the data in the third and fourth rows will change compared to the second row. In order to distinguish the data in the third and fourth rows, the split sub-strips will be represented by different serial numbers.

[0165] Tables 9a-9c show the specific values ​​of the data items for each IOU when switching from the "signed for" status to the "full transfer" status (A issues to B, B transfers the full amount to C):

[0166] Table 9a

[0167]

[0168] Table 9b

[0169]

[0170] Table 9c

[0171]

[0172] Understandable, Figure 6 The document only shows the path from "received" status to "transfer application in progress" to "transfer pending receipt" to "transfer completed". However, Tables 9a and 9c show the data for each status change from "received" to the respective statuses. Figure 6 Tables 9a-9c are merely examples and not intended to be limiting.

[0173] For full financing, the corresponding status change tables are shown in Tables 10a-10b (A issues to B, B obtains full financing from F):

[0174] Table 10a

[0175]

[0176] Table 10b

[0177]

[0178] It is understandable that the state change paths shown in Tables 10a and 10b are not in Figure 6 This is reflected in Figure 6 The state changes shown in Tables 10a and 10b are merely examples and not intended to be limiting.

[0179] If the functions described in the embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computing device readable storage medium. Based on this understanding, the parts of the embodiments of this application that contribute to the prior art or the technical solutions can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a computing device (which may be a personal computer, server, mobile computing device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0180] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0181] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A server, characterized in that, include: Generation module, state machine, and storage module; The state machine is used to switch data from a first state to a second state based on the correspondence between the switching condition and the state after detecting the occurrence of a preset switching condition. The generation module is used to update the values ​​of data items in the second state based on the values ​​of data items in the first state. Each data item includes a unique number; the number includes: information about the data's creator, creation time, sequence number, and serial number; the sequence number is a unique identifier for data created by the creator within a preset time period; the serial number indicates the number of times the creator has changed data; different states of the data correspond to different creators. The storage module is used to store data in different states, and the data includes the values ​​of preset data items; The generation module is used to update the values ​​of data items in the second state based on the values ​​of data items in the first state, including: The generation module is specifically used to: when the data in the second state is not data obtained by splitting the data in the first state, if the subjects corresponding to the data in the first state and the data in the second state are different, and the first state and the second state belong to the same business, then the serial number in the number of the data in the second state is the serial number of the data in the first state plus a preset step size; if the subjects corresponding to the data in the first state and the data in the second state are the same, then the serial number in the number of the data in the second state remains unchanged; when the data in the second state is data obtained by splitting the data in the first state, if the first state and the second state belong to the same business, then the serial number in the number of the data in the second state is the serial number of the data in the first state plus a preset step size.

2. The server according to claim 1, characterized in that, The generation module is used to update the values ​​of the data items in the second state based on the values ​​of the data items in the first state, and further includes: The generation module is further configured to use the number of the data in the first state as the parent number of the data in the second state.

3. The server according to claim 1, characterized in that, The storage module is used to store data in different states, including: The storage module is specifically used to store the data of the different states in a tree structure.

4. The server according to any one of claims 1-3, characterized in that, Also includes: The generation module is used to asynchronously synchronize the data generated by the cache module and transmit the data to the storage module.

5. A data processing system, comprising: At least one client and the server as described in any one of claims 1-4; The client includes a triggering module for issuing instructions as state switching trigger conditions, and a querying module for sending query information to the server. The server is used to transmit data as query results to the client.

6. A data processing method, characterized in that, include: After detecting the occurrence of a preset switching condition, the data is switched from the first state to the second state according to the correspondence between the switching condition and the state. This is used to update the value of the data item in the second state based on the value of the data item in the first state. Each data item includes a unique number; the number includes: information about the data's creator, creation time, sequence number, and serial number; the sequence number is a unique identifier for the data created by the creator within a preset time period; the serial number indicates the number of times the creator has changed data; different states of the data correspond to different creators. The system stores data in different states, including the values ​​of preset data items. The method for updating the value of the data item in the second state based on the value of the data item in the first state includes: If the data in the second state is not obtained by splitting the data in the first state, and if the subjects corresponding to the data in the first state and the data in the second state are different, and the first state and the second state belong to the same business, then the serial number in the number of the data in the second state is the serial number of the data in the first state plus a preset step size; if the subjects corresponding to the data in the first state and the data in the second state are the same, then the serial number in the number of the data in the second state remains unchanged; if the data in the second state is obtained by splitting the data in the first state, and the first state and the second state belong to the same business, then the serial number in the number of the data in the second state is the serial number of the data in the first state plus a preset step size.

7. An electronic device, characterized in that, Including processor and memory; The memory is used to store programs; The processor is used to run the program to implement the data processing method of claim 6.

8. A readable storage medium, characterized in that, It stores program code, which, when executed, implements the data processing method described in claim 6.

Citation Information

Patent Citations

  • Service state circulation maintenance method and device and electronic equipment

    CN112907198A