CN112988661B - Balance table updating method and related equipment thereof - Google Patents

Balance table updating method and related equipment thereof Download PDF

Info

Publication number
CN112988661B
CN112988661B CN202110189138.0A CN202110189138A CN112988661B CN 112988661 B CN112988661 B CN 112988661B CN 202110189138 A CN202110189138 A CN 202110189138A CN 112988661 B CN112988661 B CN 112988661B
Authority
CN
China
Prior art keywords
record
target
balance
updating
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110189138.0A
Other languages
Chinese (zh)
Other versions
CN112988661A (en
Inventor
古乃亮
刘海强
刘丽霞
何清
刘宜宏
李国英
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202110189138.0A priority Critical patent/CN112988661B/en
Publication of CN112988661A publication Critical patent/CN112988661A/en
Application granted granted Critical
Publication of CN112988661B publication Critical patent/CN112988661B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/128Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a balance table updating method and related equipment thereof, which are used for avoiding repeated development of updating operation under different service scenes. The method of the embodiment of the application is applied to a balance update model, wherein the balance update model is used for processing balance update services of different service scenes and comprises the following steps: if the updating request of the target bill to the balance list is monitored, determining a balance updating rule associated with the target bill and the balance list associated with the target bill, wherein the target bill is associated with a service scene; analyzing the balance updating rule to obtain rule elements, wherein the rule elements comprise record filtering conditions and operation directions; selecting a target record meeting the record filtering condition from the target bill, and processing the target record according to the operation direction to obtain a snapshot record; and updating the record corresponding to the snapshot record in the balance table according to the snapshot record so as to obtain a target balance table.

Description

Balance table updating method and related equipment thereof
Technical Field
The embodiment of the application relates to the field of data processing, in particular to a balance table updating method and related equipment.
Background
In enterprise management systems, balance update services such as credit balance update, inventory balance update, accounting balance update and the like are often involved in different service scenarios, wherein the balance update services involve the creation of balance tables and update operations for updating the balance tables.
In the prior art, a user independently designs and develops a balance table and an updating operation corresponding to a service scene according to the service scene, and if the two service scenes have commonality, the user still needs to independently design and develop the corresponding balance table and the updating operation for the two service scenes. In this way, the problem of repeated development of balance list and updating operation caused by diversified service scenes needs to be solved.
Disclosure of Invention
The embodiment of the application provides a balance table updating method and related equipment thereof, which are used for avoiding repeated development of updating operation under different service scenes.
A first implementation manner of the first aspect of the present application provides a balance table updating method, which is applied to a balance updating model, where the balance updating model is used for processing balance updating services in different service scenarios, and includes:
if the updating request of the target bill to the balance list is monitored, determining a balance updating rule associated with the target bill and the balance list associated with the target bill, wherein the target bill is associated with a service scene;
analyzing the balance updating rule to obtain rule elements, wherein the rule elements comprise record filtering conditions and operation directions;
selecting a target record meeting the record filtering condition from the target bill, and processing the target record according to the operation direction to obtain a snapshot record;
and updating the record corresponding to the snapshot record in the balance table according to the snapshot record so as to obtain a target balance table.
With reference to the first implementation manner of the first aspect of the embodiment of the present application, a second implementation manner of the first aspect of the embodiment of the present application further includes:
receiving a first operation of creating a field name according to the service scene by a user;
generating a balance table containing the field names in response to the first operation, wherein the field names carry field attributes;
receiving a second operation of creating a balance updating rule for updating the balance table by the user;
and generating the balance updating rule in response to the second operation, wherein the balance updating rule comprises the rule element.
With reference to the first implementation manner of the first aspect of the embodiment of the present application, in a third implementation manner of the first aspect of the embodiment of the present application, the rule element further includes a mapping relationship between field names between the balance table and the target document, and the recording filtering condition includes a filtering value, and then includes:
selecting an alternative record meeting the filtering value from the target bill;
and selecting a field value corresponding to the field name of the mapping relation from the alternative records, and forming a target record by the field name of the mapping relation and the selected field value.
With reference to the third implementation manner of the first aspect of the embodiment of the present application, in a fourth implementation manner of the first aspect of the embodiment of the present application, the updating request carries a target operation state of the target document, and the method further includes:
analyzing the balance table to obtain a field name included in the balance table and a field attribute of the field name; then it includes:
according to the mapping relation, determining an associated field name corresponding to the field name of the target record in the balance table;
querying field attributes of the associated field names;
if the field attribute is character attribute, extracting a field value corresponding to a field name of the target record from the target record;
if the field attribute is a numerical value attribute, extracting a field value corresponding to a field name of the target record from the target record, and calculating the field value according to an operation direction corresponding to the target operation state to obtain a target numerical value;
and generating the snapshot record according to the field value or the target value.
With reference to the first implementation manner of the first aspect of the embodiment of the present application, a fifth implementation manner of the first aspect of the embodiment of the present application includes:
extracting a field name from the snapshot record and a field value corresponding to the field name;
constructing a database instruction according to the field name and the field value;
and executing the database instruction to update the record corresponding to the snapshot record in the balance table according to the snapshot record.
A first implementation manner of the second aspect of the embodiment of the present application provides a balance table updating device, including:
the determining unit is used for determining a balance updating rule associated with the target bill and a balance table associated with the target bill if the updating request of the target bill on the balance table is monitored, wherein the target bill is associated with a service scene;
the first analysis unit is used for analyzing the balance updating rule to obtain rule elements, wherein the rule elements comprise record filtering conditions and operation directions;
a selecting unit, configured to select a target record that meets the record filtering condition from the target document;
the acquisition unit is used for processing the target record according to the operation direction to obtain a snapshot record;
and the updating unit is used for updating the record corresponding to the snapshot record in the balance table according to the snapshot record so as to obtain a target balance table.
With reference to the first implementation manner of the second aspect of the embodiment of the present application, a second implementation manner of the second aspect of the embodiment of the present application further includes:
the first receiving unit is used for receiving a first operation of creating a field name according to a service scene by a user;
the first response unit is used for responding to the first operation and generating a balance table containing the field names, wherein the field names carry field attributes;
a second receiving unit configured to receive a second operation of the user creating a balance update rule for updating the balance table;
and the second response unit is used for responding to the second operation and generating the balance updating rule, wherein the balance updating rule comprises the rule element.
With reference to the first implementation manner of the second aspect of the embodiment of the present application, in a third implementation manner of the second aspect of the embodiment of the present application, the rule element further includes a mapping relationship between a field name between the balance table and the target document, the record filtering condition includes a filtering value, and the selecting unit includes:
a first selection subunit, configured to select, from the target document, an alternative record that satisfies the filtering value;
and the second selection subunit selects a field value corresponding to the field name of the mapping relation from the alternative records, and forms a target record by the field name of the mapping relation and the selected field value.
With reference to the third implementation manner of the second aspect of the embodiment of the present application, in a fourth implementation manner of the second aspect of the embodiment of the present application, the updating request carries a target operation state of the target document, further includes:
the second parsing unit is configured to parse the balance table to obtain a field name included in the balance table and a field attribute of the field name, where the obtaining unit includes:
a determining subunit, configured to determine, in the balance table, a field name corresponding to a field name of the target record according to the mapping relationship;
a query subunit, configured to query a field attribute of the associated field name;
a first extraction subunit, configured to extract, from the target record, a field value corresponding to a field name of the target record if the query subunit queries that the field attribute is a character attribute;
the second extraction subunit is configured to extract, if the query subunit queries that the field attribute is a numerical attribute, a field value corresponding to a field name of the target record from the target record, and calculate the field value according to an operation direction corresponding to the target operation state to obtain a target numerical value;
and the generation subunit is used for generating the snapshot record from the field value or the target value.
With reference to the first implementation manner of the second aspect of the embodiment of the present application, a fifth implementation manner of the second aspect of the embodiment of the present application, the updating unit includes:
an extraction subunit, configured to extract a field name from the snapshot record, and a field value corresponding to the field name;
a constructing subunit, configured to construct a database instruction according to the field name and the field value;
and the execution subunit is used for executing the database instruction so as to update the record corresponding to the snapshot record in the balance table according to the snapshot record.
In a third aspect of the embodiments of the present application, there is provided a balance table updating apparatus, including:
a central processing unit and a memory;
the central processor is configured to communicate with the memory and to execute instruction operations in the memory on the balance table updating means to perform any of the embodiments described in the first aspect above.
In a fourth aspect of the embodiments of the present application, there is provided a computer-readable storage medium having a program stored therein, which when executed by a computer, performs any of the embodiments described in the first aspect.
In a fifth aspect of the embodiments of the present application, there is provided a computer program product which, when executed on a computer, performs an implementation of any of the preceding first aspects.
From the above technical solutions, the embodiments of the present application have the following advantages:
according to the technical scheme, after the balance updating model of different business scenes is processed and the balance updating rule and the balance table are determined after the balance updating model monitors the updating request of the target bill to the balance table, the balance updating rule is analyzed to obtain rule elements comprising record filtering conditions and operation directions, then target records meeting the record filtering conditions are selected from the target bill, the target records are processed according to the operation directions to obtain snapshot records, and finally the balance table is updated according to the snapshot records. Compared with the prior art, the balance update model of the technical scheme can update the balance tables of different service scenes through the steps, and the situation that the update operation is repeatedly developed because of different service scenes in the prior art is avoided.
Drawings
FIG. 1 is a schematic flow chart of a balance table updating method in an embodiment of the present application;
FIG. 2 is a schematic flow chart of a balance table updating method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a balance table updating method according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of a balance table updating method according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of a balance table updating method according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a balance table updating device according to an embodiment of the present application;
fig. 7 is a schematic diagram of another configuration of a balance table updating device in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a balance table updating method and related equipment thereof, which are used for avoiding repeated development of updating operation under different service scenes.
In the prior art, a balance table and an updating operation for updating the balance table are often independently developed based on a service scene, and a general model does not exist, so that the cost is high and the efficiency is low. The balance table and the balance updating rule are created through the balance updating model capable of processing different service scenes, and the balance table is updated. The balance updating model comprises a balance table model, an updating rule model and an updating engine model, wherein the balance table model is used for a user to create a balance table corresponding to a service scene according to the service scene, the updating rule model is used for creating a balance updating rule for the balance table created under the service scene, the updating engine model is used for updating the created balance table through the created balance updating rule, and the service scene, the balance table and the balance updating rule are related to each other.
Based on the foregoing, referring to fig. 1, an embodiment of the present application describes that an update engine model updates a created balance table through a created update rule, including:
101. if the updating request of the target bill to the balance list is monitored, determining a balance updating rule associated with the target bill and the balance list associated with the target bill, wherein the target bill is associated with a service scene.
When a user generates balance tables and balance updating rules under different service scenes through a balance updating model, an updating engine model in the balance updating model monitors updating requests of target documents related to each balance table according to triggering conditions of each balance updating rule. The method specifically comprises the steps that when the updating engine model monitors that a target bill is in an updating request of a target operation state, the updating engine model determines a balance table and a balance updating rule which are related to the target bill. The update request of the target operation state is an update request of the audit operation state or the anti-audit operation state, which is not limited herein.
The updating engine model determines a balance updating rule associated with the target bill when monitoring that the target bill is in an updating request of an auditing operation state, and determines a balance table according to the balance updating rule, wherein the balance updating rule can be an original balance updating rule, can be a balance updating rule obtained by combining original balance updating rule information and extended rule information, and can be an original balance table, or can be a balance table obtained by combining original balance table information and extended balance table information.
102. Analyzing the balance updating rule to obtain rule elements, wherein the rule elements comprise record filtering conditions and operation directions.
The updating engine model analyzes the balance table updating rule to obtain rule elements, wherein the rule elements comprise record filtering conditions and operation directions.
It should be noted that, the record filtering condition is determined when the user creates a balance updating rule, specifically, when the user is not configured with a filtering value of the record filtering condition, the updating engine model determines the record filtering condition that the filtering value is null; when the user configures the filtering value of the record filtering condition, the updating engine model determines the record filtering condition that the filtering value is a non-null value. The operation direction is used for indicating the updating engine model to determine the increase and decrease of the field value of the target record. The increasing/decreasing property is used for determining an operation direction of the field value, for example, the field value is 10, and if the operation direction is increasing or increasing, the field value is determined to be 10 with an addition attribute in the arithmetic operation, namely, the field value is 10 with an addition relative to the added number; if the direction of the operation is subtractive or decreasing, 10 is determined to be 10 having a subtractive attribute in the arithmetic operation, that is, 10 is a subtractive number with respect to the number to be subtracted.
103. And selecting a target record meeting the record filtering condition from the target bill, and processing the target record according to the operation direction to obtain a snapshot record.
The target bill comprises a plurality of records, after the engine model is updated to obtain the record filtering condition, the engine model is updated to determine the target record from the plurality of records of the target bill according to the filtering value of the record filtering condition, and the field value of the target record is processed according to the operation direction to obtain the snapshot record.
104. And updating the record corresponding to the snapshot record in the balance table according to the snapshot record so as to obtain a target balance table.
After obtaining the snapshot record, the updating engine model updates the record corresponding to the snapshot record in the balance table according to the snapshot record, so as to obtain the target balance table.
It should be noted that, the balance table and the update rule used by the update engine model during the update have been configured.
Based on the embodiment of fig. 1, the following embodiment describes how to create a balance table and balance update rules, please refer to fig. 2, including:
in this embodiment, a user creates a balance table through a balance table model of a balance update model, and an update rule model of the balance update model creates a balance update rule for the created balance table. It should be noted that, the balance table model defines a balance table structure, after a user configures a specific field name on the balance table creation interface according to a service scenario, the balance table model generates a balance table corresponding to the specific field name, the update rule model defines an update relationship structure of the balance table and the target document, the user configures a specific update relationship on the update rule creation interface according to the same service scenario, and the update rule model generates a balance update rule corresponding to the specific update relationship.
201. And receiving a first operation of creating a field name according to the service scene by the user.
The user can select the field names required by the user from the fields provided by the interface on the balance table creation interface, and can also autonomously add the field names which the interface fails to provide, so that the balance table model receives the first operation of selecting and/or adding the field names created by the user. Wherein the field names created by the user are determined by the user based on the service scenario.
It should be noted that, the field names provided by the balance table creation interface have common field names, for the common field names, the user only needs to select the required field names according to the service scenario, if the balance table creation interface does not have the required field names of the service scenario, the required field names can be added correspondingly.
It should be noted that, the user may perform the first operation of adding or deleting the field name to or from the created balance table, that is, the original balance table.
202. And responding to the first operation, generating a balance table containing the field names, wherein the field names carry field attributes.
After the balance table model receives the first operation of creating the field name, a balance table containing the field name is generated.
It should be noted that, the field name of the balance table carries a field attribute, the field attribute of the field name is correspondingly determined by the user when the field name is created based on the field attribute on the balance table creation interface, the field attribute corresponding to the field name can be a character attribute or a numerical value attribute, and the field name of the numerical value attribute is associated with an operation direction which is not determined yet, namely, whether the increment or the decrement is performed.
203. A second operation of the user creating a balance update rule for updating the balance table is received.
The user creates a mapping relationship, a trigger condition, an operation direction, and a record filtering condition on the update rule creation interface, and updates the rule model to receive a second operation of creating the mapping relationship, the trigger condition, the operation direction, and the record filtering condition. And the mapping relation is used for determining the fields which need to be updated. Record filtering conditions for determining the record that needs to be updated. The trigger condition is used to determine a condition for updating the balance table. And the operation direction is used for determining whether the field value of the target bill is used for increasing or decreasing, and is correlated with the triggering condition.
It should be noted that, the triggering condition is a target operation state of a target document associated with the balance table configured by the user, where the target operation state is used to request updating of the balance table, when the target document is in the target operation state, the update engine model monitors an update request of the target document and starts updating of the balance table, and the target operation state may be a plurality of target documents, for example, in an audit operation state, or in a review operation state, where the specific example is not limited herein. The operation direction is configured by the user based on the target operation state, for example, the audit operation state corresponds to an increased operation direction, and the anti-audit operation state corresponds to a decreased operation direction, which is not limited herein. The record filtering condition may be a record filtering condition of a null type filtering value which is not configured by the user, or may be a record filtering condition of a non-null type filtering value which is configured by the user, and is not limited herein. For the record filtering condition of the null value type filtering value, the updating engine model determines all records of the target bill as records used for updating in the subsequent updating process, and for the record filtering condition of the non-null value type filtering value, the updating engine model determines the record which does not contain the non-null value type filtering value from all records of the target bill in the subsequent updating process, wherein the record is used for updating. The mapping relation is the corresponding relation of the field names between the balance table and the target bill, and the user selects the required field names with the same name based on the field names of the balance table and the field names of the target bill, so that the mapping relation is created, and the visible mapping relation is the corresponding relation of the field names with the same name between the balance table and the target bill.
It should be noted that, the user may also perform the second operation of creating the balance update rule on the created balance update rule, that is, the original balance update rule.
204. And generating the balance updating rule in response to the second operation, wherein the balance updating rule comprises the rule element.
After receiving a second operation of creating a balance update rule, the update rule model generates a balance update rule including rule elements of a mapping relation, a trigger condition, a record filtering condition and an operation direction.
In the embodiment, the user can generate the balance table only by configuring the field names of the balance table on the interface for creating the balance table, and can generate the balance updating rule for updating the balance table by configuring the updating relation between the bill and the balance table on the interface for creating the balance updating rule, so that the balance table and the balance updating rule in various scenes are not required to be independently developed and formulated as in the prior art, and the repeated development is avoided.
Based on fig. 2, please refer to fig. 3, the present embodiment describes how the update engine model determines the target record, including:
301. and selecting an alternative record meeting the filtering value from the target bill.
After the updating engine model obtains the filtering value of the record filtering condition, selecting an alternative record meeting the filtering value from all records of the target bill, if the filtering value is a null value type filtering value, determining all records of the target bill as records used for updating, namely alternative records, if the filtering value is a non-null value type filtering value, determining the record which does not contain the non-null value type filtering value from all records of the target bill, namely alternative records, by the updating engine model. The alternative record can be one alternative record or a plurality of alternative records, and the fields of the alternative record are the same as the fields of the target document.
302. And selecting a field value corresponding to the field name of the mapping relation from the alternative records, and forming a target record by the field name of the mapping relation and the selected field value.
After the update engine model selects the alternative record, the update engine model selects a field value corresponding to the field name of the mapping relation in the alternative record, and composes the field name of the mapping relation and the selected field value into the target record.
It should be noted that the target record may be one target record or multiple target records, and the fields of the target record may be the same as or different from the fields of the target document, and are determined by the mapping relationship.
Referring to fig. 4, based on the embodiment of fig. 3, fig. 4 depicts a process for updating an engine model to generate snapshot records, including:
401. analyzing the balance table to obtain a field name included in the balance table and a field attribute of the field name.
And the updating engine model analyzes the balance table to obtain the field names and the field attributes of the field names included in the balance table.
402. And determining an associated field name corresponding to the field name of the target record in the balance table according to the mapping relation.
And updating the engine model to obtain the field names of the target records, and determining the associated field names corresponding to the field names of the target records in the balance table through the corresponding relation between the balance table and the field names of the target documents in the mapping relation.
403. And querying the field attribute of the associated field name.
Because the field names in the balance table carry field attributes, after the update engine model determines the associated field names in the balance table, the field attributes of the associated field names are queried.
404. And if the field attribute is character attribute, extracting a field value corresponding to the field name of the target record from the target record.
If the field attribute is inquired to be character attribute, the updating engine model extracts a field value under the field name of the target record from the target record.
405. And if the field attribute is a numerical value attribute, extracting a field value corresponding to a field name of the target record from the target record, and calculating the field value according to an operation direction corresponding to the target operation state to obtain a target numerical value.
If the updating engine model inquires that the field attribute is a numerical attribute, the updating engine model extracts a field value corresponding to the field name of the target record from the target record, and calculates the field value according to the operation direction corresponding to the target operation state to obtain a target numerical value, wherein the target numerical value can be a numerical value containing signs.
For example, if the target operation state is the audit operation state, the operation direction associated with the audit operation state is the increment or increment direction, the field value of the field name of the numerical attribute recorded as the target is 10, the field value of 10 is determined to be the target value of +10 based on the operation direction being the increment direction, and +10 is the target value with the addend attribute.
406. And generating the snapshot record according to the field value and/or the target value.
After the field value of step 404 and/or the target value of step 405 are obtained, the update engine model generates a snapshot record according to the field value and/or the target value and the field name of the target record associated with the field value and/or the target value. Specifically, the update engine model constructs a database instruction, such as an SQL (Structured Query Language ) instruction, for generating a snapshot record by the field name and the field value of the target record and/or the field name and the target value of the target record, and executes the database instruction to extract data from the target record and generate a snapshot record table, where the snapshot record contains a snapshot record, and the snapshot record may be one snapshot record or a plurality of snapshot records, and the snapshot record or the snapshot record table may be used to trace back an update process of the balance table.
Based on fig. 4, referring to fig. 5, fig. 5 depicts an update engine model updating a balance table via snapshot records, including:
501. and extracting a field name from the snapshot record and a field value corresponding to the field name.
The update engine model extracts a field name and a field value corresponding to the field name from the snapshot record.
502. And constructing a database instruction according to the field name and the field value.
The update engine model constructs a database instruction for updating the balance table according to the acquired field names and field values.
503. And executing the database instruction to update the record corresponding to the snapshot record in the balance table according to the snapshot record.
The updating engine model executes a database instruction, extracts record data from the snapshot record and inquires relevant records corresponding to the record data in the balance table, if the relevant records are inquired in the balance table, the relevant records are updated, and if the relevant records are not inquired, the record data are added in the balance table, so that an updated target balance table is obtained.
Referring to fig. 6, an embodiment of the present application provides a balance table updating device, including:
the determining unit 601 is configured to determine a balance update rule associated with a target document and a balance table associated with the target document if an update request of the target document for the balance table is detected, where the target document is associated with a service scenario;
a first parsing unit 602, configured to parse the balance update rule to obtain rule elements, where the rule elements include a record filtering condition and an operation direction;
a selecting unit 603, configured to select a target record that meets the record filtering condition from the target documents;
an obtaining unit 604, configured to process the target record according to the operation direction to obtain a snapshot record;
and the updating unit 605 is configured to update a record corresponding to the snapshot record in the balance table according to the snapshot record, so as to obtain a target balance table.
In one implementation, the balance table updating device further includes:
the first receiving unit is used for receiving a first operation of creating a field name according to a service scene by a user;
the first response unit is used for responding to the first operation and generating a balance table containing the field names, wherein the field names carry field attributes;
a second receiving unit configured to receive a second operation of the user creating a balance update rule for updating the balance table;
and the second response unit is used for responding to the second operation and generating the balance updating rule, wherein the balance updating rule comprises the rule element.
In one implementation, the rule element further includes a mapping relationship between field names of the balance table and the target document, the record filtering condition includes a filtering value, and the selecting unit 603 includes:
a first selection subunit, configured to select, from the target document, an alternative record that satisfies the filtering value;
and the second selection subunit selects a field value corresponding to the field name of the mapping relation from the alternative records, and forms a target record by the field name of the mapping relation and the selected field value.
In one implementation manner, the update request carries a target operation state of the target document, and the balance table updating device further includes:
a second parsing unit, configured to parse the balance table to obtain a field name included in the balance table and a field attribute of the field name, where the obtaining unit 604 includes:
a determining subunit, configured to determine, in the balance table, a field name corresponding to a field name of the target record according to the mapping relationship;
a query subunit, configured to query a field attribute of the associated field name;
a first extraction subunit, configured to extract, from the target record, a field value corresponding to a field name of the target record if the query subunit queries that the field attribute is a character attribute;
the second extraction subunit is configured to extract, if the query subunit queries that the field attribute is a numerical attribute, a field value corresponding to a field name of the target record from the target record, and calculate the field value according to an operation direction corresponding to the target operation state to obtain a target numerical value;
and the generation subunit is used for generating the snapshot record from the field value or the target value.
In one implementation, the updating unit 605 includes:
an extraction subunit, configured to extract a field name from the snapshot record, and a field value corresponding to the field name;
a constructing subunit, configured to construct a database instruction according to the field name and the field value;
and the execution subunit is used for executing the database instruction so as to update the record corresponding to the snapshot record in the balance table according to the snapshot record.
Fig. 7 is another schematic structural diagram of a balance table updating device provided in an embodiment of the present application, where the balance table updating device 701 may include one or more central processing units (central processing units, CPU) 702 and a memory 706, and one or more application programs or data are stored in the memory 706.
Wherein the memory 706 may be volatile storage or persistent storage. The program stored in the memory 706 may include one or more modules, each of which may include a series of instruction operations on the server. Still further, the central processor 702 may be arranged to communicate with the memory 706 and to execute a series of instruction operations in the memory 706 on the balance table updating means 701.
The balance table updating device 701 may also include one or more power supplies 703, one or more wired or wireless network interfaces 704, one or more input output interfaces 705, and/or one or more operating systems, such as Windows ServerTM, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
It should be noted that the balance table updating device 701 may also not include one or more power supplies 703, one or more wired or wireless network interfaces 704, one or more input/output interfaces 705, and/or one or more operating systems.
The balance table updating device 701 may perform the operations in the embodiments shown in any of the foregoing fig. 1 to 5, and detailed descriptions thereof are omitted herein.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM, random access memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (9)

1. The balance table updating method is characterized by being applied to a balance updating model, wherein the balance updating model is used for processing balance updating services of different service scenes and comprises the following steps:
if the updating request of the target bill to the balance list is monitored, determining a balance updating rule associated with the target bill and the balance list associated with the target bill, wherein the target bill is associated with a service scene;
analyzing the balance updating rule to obtain rule elements, wherein the rule elements comprise record filtering conditions and operation directions;
selecting a target record meeting the record filtering condition from the target bill, and processing the target record according to the operation direction to obtain a snapshot record;
updating records corresponding to the snapshot records in the balance table according to the snapshot records to obtain a target balance table;
the rule element further comprises a mapping relation of field names between the balance table and a target bill, the update request carries a target operation state of the target bill, and the method further comprises:
analyzing the balance table to obtain a field name included in the balance table and a field attribute of the field name; processing the target record according to the operation direction to obtain a snapshot record, including:
according to the mapping relation, determining an associated field name corresponding to the field name of the target record in the balance table;
querying field attributes of the associated field names;
if the field attribute is character attribute, extracting a field value corresponding to a field name of the target record from the target record;
if the field attribute is a numerical value attribute, extracting a field value corresponding to a field name of the target record from the target record, and calculating the field value according to an operation direction corresponding to the target operation state to obtain a target numerical value;
and generating the snapshot record according to the field value and/or the target value.
2. The balance table updating method according to claim 1, further comprising:
receiving a first operation of creating a field name according to the service scene by a user;
generating a balance table containing the field names in response to the first operation, wherein the field names carry field attributes;
receiving a second operation of creating a balance updating rule for updating the balance table by the user;
and generating the balance updating rule in response to the second operation, wherein the balance updating rule comprises the rule element.
3. The balance table updating method according to claim 1, wherein the record filtering condition includes a filtering value, and the selecting a target record satisfying the record filtering condition from the target document includes:
selecting an alternative record meeting the filtering value from the target bill;
and selecting a field value corresponding to the field name of the mapping relation from the alternative records, and forming a target record by the field name of the mapping relation and the selected field value.
4. The balance table updating method according to claim 1, wherein updating the record corresponding to the snapshot record in the balance table according to the snapshot record includes:
extracting a field name from the snapshot record and a field value corresponding to the field name;
constructing a database instruction according to the field name and the field value;
and executing the database instruction to update the record corresponding to the snapshot record in the balance table according to the snapshot record.
5. A balance table updating apparatus, comprising:
the determining unit is used for determining a balance updating rule associated with the target bill and a balance table associated with the target bill if the updating request of the target bill on the balance table is monitored, wherein the target bill is associated with a service scene;
the analysis unit is used for analyzing the balance updating rule to obtain rule elements, wherein the rule elements comprise record filtering conditions and operation directions;
a selecting unit, configured to select a target record that meets the record filtering condition from the target document;
the acquisition unit is used for processing the target record according to the operation direction to obtain a snapshot record;
the updating unit is used for updating the record corresponding to the snapshot record in the balance table according to the snapshot record so as to obtain a target balance table;
the rule element further comprises a mapping relation of field names between the balance table and a target bill, the update request carries a target operation state of the target bill,
the balance table updating device further comprises:
the analysis unit is used for analyzing the balance table to obtain a field name included in the balance table and a field attribute of the field name;
the obtaining unit is specifically configured to determine, according to the mapping relationship, an associated field name corresponding to a field name of the target record in the balance table, query a field attribute of the associated field name, extract a field value corresponding to the field name of the target record from the target record if the field attribute is a character attribute, extract a field value corresponding to the field name of the target record from the target record if the field attribute is a numerical attribute, and calculate the field value according to an operation direction corresponding to the target operation state to obtain a target value, and generate the snapshot record from the field value and/or the target value.
6. The balance table updating apparatus according to claim 5, wherein the balance table updating apparatus further comprises:
the first receiving unit is used for receiving a first operation of creating a field name according to the service scene by a user;
the first response unit is used for responding to the first operation and generating a balance table containing the field names, wherein the field names carry field attributes;
a second receiving unit configured to receive a second operation of the user creating a balance update rule for updating the balance table;
and the second response unit is used for responding to the second operation and generating the balance updating rule, wherein the balance updating rule comprises the rule element.
7. The balance table updating apparatus according to claim 5, wherein the record filtering condition includes a filtering value, and the selecting unit includes:
a first selection subunit, configured to select, from the target document, an alternative record that satisfies the filtering value;
and the second selection subunit is used for selecting a field value corresponding to the field name of the mapping relation from the alternative records, and forming a target record by the field name of the mapping relation and the selected field value.
8. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 4.
9. A balance table updating apparatus, comprising:
a central processing unit and a memory;
the central processor is configured to communicate with the memory, and to invoke instruction operations in the memory on the balance table updating means to perform the method of any of claims 1 to 4.
CN202110189138.0A 2021-02-19 2021-02-19 Balance table updating method and related equipment thereof Active CN112988661B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110189138.0A CN112988661B (en) 2021-02-19 2021-02-19 Balance table updating method and related equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110189138.0A CN112988661B (en) 2021-02-19 2021-02-19 Balance table updating method and related equipment thereof

Publications (2)

Publication Number Publication Date
CN112988661A CN112988661A (en) 2021-06-18
CN112988661B true CN112988661B (en) 2024-03-19

Family

ID=76393435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110189138.0A Active CN112988661B (en) 2021-02-19 2021-02-19 Balance table updating method and related equipment thereof

Country Status (1)

Country Link
CN (1) CN112988661B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335410A (en) * 2014-07-31 2016-02-17 优视科技有限公司 Synthesis rendering acceleration based webpage updating method and apparatus
WO2017008657A1 (en) * 2015-07-14 2017-01-19 阿里巴巴集团控股有限公司 Method and system for acquiring data snapshot
CN108874403A (en) * 2018-05-30 2018-11-23 深圳市分期乐网络科技有限公司 Dissemination method, device, equipment and the storage medium of rule file
US10216757B1 (en) * 2014-12-23 2019-02-26 EMC IP Holding Company LLC Managing deletion of replicas of files
CN110297837A (en) * 2019-06-14 2019-10-01 阿里巴巴集团控股有限公司 A kind of data-updating method and device, data query method and apparatus
CN112015771A (en) * 2020-10-15 2020-12-01 北京新唐思创教育科技有限公司 Data retrieval method and device, electronic equipment and computer storage medium
CN112036999A (en) * 2020-09-02 2020-12-04 中国银行股份有限公司 Method and device for inquiring balance information of accounting subject

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9116975B2 (en) * 2013-10-18 2015-08-25 Palantir Technologies Inc. Systems and user interfaces for dynamic and interactive simultaneous querying of multiple data stores

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335410A (en) * 2014-07-31 2016-02-17 优视科技有限公司 Synthesis rendering acceleration based webpage updating method and apparatus
US10216757B1 (en) * 2014-12-23 2019-02-26 EMC IP Holding Company LLC Managing deletion of replicas of files
WO2017008657A1 (en) * 2015-07-14 2017-01-19 阿里巴巴集团控股有限公司 Method and system for acquiring data snapshot
CN108874403A (en) * 2018-05-30 2018-11-23 深圳市分期乐网络科技有限公司 Dissemination method, device, equipment and the storage medium of rule file
CN110297837A (en) * 2019-06-14 2019-10-01 阿里巴巴集团控股有限公司 A kind of data-updating method and device, data query method and apparatus
CN112036999A (en) * 2020-09-02 2020-12-04 中国银行股份有限公司 Method and device for inquiring balance information of accounting subject
CN112015771A (en) * 2020-10-15 2020-12-01 北京新唐思创教育科技有限公司 Data retrieval method and device, electronic equipment and computer storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Efficient snapshot retrieval over historical graph data;Udayan Khurana等;《2013 IEEE 29th International conference on data engineering》;1-9 *
基于企业信息资源目录的多源ETL模型的研究;于洋;《中国优秀硕士学位论文全文数据库 经济与管理科学辑》;J152-752 *

Also Published As

Publication number Publication date
CN112988661A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN109597974B (en) Report generation method and device
CN111339171B (en) Data query method, device and equipment
US11681707B1 (en) Analytics query response transmission
US20020143667A1 (en) Method and system for inventory management
CN111382182A (en) Data processing method and device, electronic equipment and storage medium
CN110597896A (en) Data display method, data display device and terminal equipment
CN110109981B (en) Information display method and device for work queue, computer equipment and storage medium
CN110941634A (en) Data processing method and device, storage medium and electronic device
CN109101541B (en) Newly added index management method, device and computer readable storage medium
CN110704472A (en) Data query statistical method and device
CN112988661B (en) Balance table updating method and related equipment thereof
CN110362540B (en) Data storage and visitor number acquisition method and device
CN115827646B (en) Index configuration method and device and electronic equipment
CN110674387A (en) Method, apparatus, and computer storage medium for data search
US9824140B2 (en) Method of creating classification pattern, apparatus, and recording medium
CN114676182A (en) Chart generation method and device, computer equipment and computer readable storage medium
CN110968679A (en) Data query method and device
CN112749197B (en) Data fragment refreshing method, device, equipment and storage medium
CN110597572B (en) Service call relation analysis method and computer system
CN112765200A (en) Data query method and device based on Elasticissearch
CN113448985A (en) API (application program interface) interface generation method, calling method and device and electronic equipment
CN116303627B (en) Query method and device for semiconductor test data, electronic equipment and storage medium
CN115718825B (en) Method and device for determining duration label and electronic equipment
CN109933573B (en) Database service updating method, device and system
CN114237699B (en) Configuration script exporting method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant