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

Balance table updating method and related equipment thereof Download PDF

Info

Publication number
CN112988661A
CN112988661A CN202110189138.0A CN202110189138A CN112988661A CN 112988661 A CN112988661 A CN 112988661A CN 202110189138 A CN202110189138 A CN 202110189138A CN 112988661 A CN112988661 A CN 112988661A
Authority
CN
China
Prior art keywords
balance
target
updating
record
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.)
Granted
Application number
CN202110189138.0A
Other languages
Chinese (zh)
Other versions
CN112988661B (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

Images

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 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 document to the balance table is monitored, determining a balance updating rule associated with the target document and the balance table associated with the target document, wherein the target document is associated with a business scene; analyzing the balance updating rule to obtain a rule element, wherein the rule element comprises a record filtering condition and an operation direction; selecting target records meeting the record filtering conditions from the target documents, and processing the target records according to the operation direction to obtain snapshot records; and updating records corresponding to the snapshot records in the balance list according to the snapshot records to obtain a target balance list.

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
Balance updating services of different service scenes are often involved in an enterprise management system, such as updating services of credit balance updating, inventory balance updating, accounting balance updating and the like, wherein the balance updating services involve creation of a balance table and an updating operation for updating the balance table.
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. Therefore, the problem of repeated development of balance tables and updating operations caused by diversification of business 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 embodiment 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 to process balance updating services in different service scenarios, and the method includes:
if the updating request of the target document to the balance table is monitored, determining a balance updating rule associated with the target document and the balance table associated with the target document, wherein the target document is associated with a business scene;
analyzing the balance updating rule to obtain a rule element, wherein the rule element comprises a record filtering condition and an operation direction;
selecting target records meeting the record filtering conditions from the target documents, and processing the target records according to the operation direction to obtain snapshot records;
and updating records corresponding to the snapshot records in the balance list according to the snapshot records to obtain a target balance list.
With reference to the first implementation manner of the first aspect of the embodiment of the present application, the 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 by a user according to the service scene;
responding to the first operation, and generating a balance table containing the field names, wherein the field names carry field attributes;
receiving a second operation of the user to create a balance update rule for updating the balance table;
generating the balance update rule in response to the second operation, the balance update rule including 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 filter condition includes a filter value, and then the method includes:
selecting alternative records 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 update request carries a target operation state of the target document, and the method further includes:
analyzing the balance table to obtain field names included in the balance table and field attributes of the field names; then the method comprises the following steps:
determining an associated field name corresponding to the field name of the target record in the balance table according to the mapping relation;
inquiring the field attribute of the associated field name;
if the field attribute is a character attribute, extracting a field value corresponding to the 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 the field name of the target record from the target record, and calculating the field value according to the 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 numerical value.
With reference to the first implementation manner of the first aspect of the embodiments of the present application, a fifth implementation manner of the first aspect of the embodiments of the present application includes:
extracting a field name and a field value corresponding to the field name from the snapshot record;
forming a database instruction according to the field names and the field values;
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 apparatus, including:
the determining unit is used for determining a balance updating rule associated with the target document and a balance table associated with the target document if a balance table updating request of the target document is monitored, wherein the target document is associated with a business scene;
the first analysis unit is used for analyzing the balance updating rule to obtain a rule element, wherein the rule element comprises a record filtering condition and an operation direction;
the selecting unit is used for selecting the target records meeting the record filtering condition from the target documents;
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.
In combination with the first implementation manner of the second aspect of the embodiment of the present application, the 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;
a first response unit, configured to generate, in response to the first operation, a balance table including the field name, where the field name carries a field attribute;
a second receiving unit configured to receive a second operation of the user to create a balance update rule for updating the balance table;
a second response unit, configured to generate the balance update rule in response to the second operation, where the balance update rule includes 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 field names between the balance table and the target document, the record filtering condition includes a filtering value, and the selecting unit includes:
the first selection subunit is used for selecting the alternative records meeting the filtering value from the target document;
and the second selection subunit selects a field value corresponding to the field name of the mapping relation from the candidate 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, and the updating method 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 includes:
a determining subunit, configured to determine, according to the mapping relationship, a field name corresponding to the field name of the target record in the balance table;
the query subunit is used for querying the field attribute of the associated field name;
a first extracting subunit, configured to, if the field attribute is queried by the querying subunit as a character attribute, extract a field value corresponding to a field name of the target record from the target record;
a second extracting subunit, configured to, if the field attribute is a numerical attribute, the querying subunit extracts a field value corresponding to the field name of the target record from the target record, and performs an operation on the field value according to an operation direction corresponding to the target operation state to obtain a target numerical value;
and the generating subunit is used for generating the snapshot record according to the field value or the target numerical value.
With reference to the first implementation manner of the second aspect of the embodiment of the present application, in a fifth implementation manner of the second aspect of the embodiment of the present application, the updating unit includes:
the extracting subunit is used for extracting the field names and the field values corresponding to the field names from the snapshot records;
the composition subunit is used for composing 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 storage;
the central processor is configured to communicate with the memory, and execute the instruction operations in the memory on the balance table updating device to execute any one of the embodiments of the first aspect.
In a fourth aspect of embodiments of the present application, a computer-readable storage medium is provided, in which a program is stored, and when the program is executed by the computer, the computer performs any one of the embodiments described in the foregoing first aspect.
In a fifth aspect of the embodiments of the present application, there is provided a computer program product, when the computer program product is executed on a computer, the computer executes the implementation manner of any one of the foregoing first aspects.
According to the technical scheme, the embodiment of the application has the following advantages:
in the technical scheme, when balance updating requests of target documents to a balance table are monitored by balance updating models of different service scenes, a balance updating rule and the balance table are determined, then the balance updating rule is analyzed to obtain rule elements including recording filtering conditions and operation directions, then target records meeting the recording filtering conditions are selected from the target documents, 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 updating model of the technical scheme can realize the updating of the balance tables of different service scenes through the steps, and avoids the situation that the updating operation is repeatedly developed due to different service scenes in the prior art.
Drawings
FIG. 1 is a schematic flow chart illustrating a method for updating a balance list according to an embodiment of the present application;
FIG. 2 is another flow chart illustrating a method for updating a balance list according to an embodiment of the present application;
FIG. 3 is another flow chart illustrating a method for updating a balance list according to an embodiment of the present application;
FIG. 4 is a schematic flow chart illustrating a method for updating a balance list according to an embodiment of the present application;
FIG. 5 is a schematic flow chart illustrating a method for updating a balance list according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a balance table updating apparatus in the embodiment of the present application;
fig. 7 is another schematic structural diagram of a balance table updating apparatus in the 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 established through the balance updating model capable of processing different service scenes, and the balance table is updated. 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, and the updating engine model is used for updating the created balance table according to the created balance updating rule.
Based on the above, referring to fig. 1, an embodiment of the present application describes that the update engine model updates the created balance table according to the created update rule, including:
101. if the balance table updating request of the target document is monitored, determining a balance updating rule associated with the target document and a balance table associated with the target document, wherein the target document is associated with a business scene.
When a user generates balance tables and balance updating rules under different business scenes through the balance updating model, the updating engine model in the balance updating model monitors the updating requests of the target documents related to the balance tables according to the triggering conditions of the balance updating rules. Specifically, when an update request that a target document is in a target operation state is monitored, the update engine model determines a balance table and a balance update rule associated with the target document. The update request of the target operating state is an update request of an audit operating state or an anti-audit operating state, and is not limited herein.
Illustratively, when the update engine model monitors that a target document is in an update request of an auditing operation state, the update engine model determines a balance update rule associated with the target document, and determines a balance table according to the balance update rule, wherein the balance update rule may be an original balance update rule or a balance update rule obtained by combining information of the original balance update rule and an extended rule, and the balance table may be an original balance table or a balance table obtained by combining information of the original balance table and the extended balance table.
102. And analyzing the balance updating rule to obtain a rule element, wherein the rule element comprises a record filtering condition and an operation direction.
And analyzing the balance table updating rule by the updating engine model to obtain a rule element, wherein the rule element comprises a record filtering condition and an operation direction.
It should be noted that the recording filter condition is determined when the user creates a balance update rule, specifically, when the user is not configured with a filter value for recording the filter condition, the update engine model determines that the filter value is a null record filter condition; when the user is configured with the filtering value of the recording filtering condition, the updating engine model determines that the filtering value is the recording filtering condition of non-null value. The operation direction is used for indicating the increment and decrement of the field value of the target record determined by the updating engine model. The increasing and decreasing property is used to determine the operation direction on the field value, for example, the field value is 10, if the operation direction is increasing or increasing direction, 10 is determined as 10 with addend attribute in the arithmetic operation, that is, 10 is addend relative to the addend; if the arithmetic direction is a decreasing or decreasing direction, 10 is determined to be 10 having a decremental attribute in arithmetic operation, that is, 10 is a divisor relative to the subtrahend.
103. And selecting target records meeting the record filtering conditions from the target documents, and processing the target records according to the operation direction to obtain snapshot records.
The target document comprises a plurality of records, after the engine model is updated to obtain record filtering conditions, the engine model is updated to determine the target records from the plurality of records of the target document according to the filtering values of the record filtering conditions, and the field values of the target records are processed according to the operation direction to obtain snapshot records.
104. And updating records corresponding to the snapshot records in the balance list according to the snapshot records to obtain a target balance list.
And after the update engine model obtains the snapshot record, the update 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 are configured.
Based on the embodiment of fig. 1, the following embodiment describes how to create balance tables and balance update rules, referring to fig. 2, including:
in this embodiment, the user creates a balance table through the balance table model of the balance update model, and creates a balance update rule for the created balance table through the update rule model of the balance update model. It should be noted that, the balance table model defines a balance table structure, after the 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 between the balance table and the target document, the user also 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 by a user according to the service scene.
The user can select the field name required by the user from the field provided by the interface on the balance list creation interface, and can also automatically add the field name which cannot be provided by the interface, and the balance list model receives the first operation of selecting and/or adding the field name created by the user. Wherein the field name created by the user is 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, and for the common field name users, only the required field names need to be selected according to the service scenario, and 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 also perform the first operation of adding, deleting and modifying the field names on the created balance table, that is, the original balance table.
202. And responding to the first operation, and generating a balance table containing the field name, wherein the field name carries field attributes.
After the balance table model receives the first operation of creating the field names, the balance table containing the field names is generated.
It should be noted that the field names of the balance table carry field attributes, the field attributes of the field names are correspondingly determined when the user creates the field names on the balance table creation interface based on the field attributes, the field attributes corresponding to the field names may be character attributes or numerical attributes, and the field names of the numerical attributes are associated with operation directions that have not been determined, that is, increase amounts or decrease amounts.
203. Receiving a second operation of the user to create a balance update rule for updating the balance table.
And the user creates the mapping relation, the triggering condition, the operation direction and the record filtering condition on the update rule creation interface, and updates the rule model so as to receive a second operation of creating the mapping relation, the triggering condition, the operation direction and the record filtering condition. And the mapping relation is used for determining the fields needing to be updated. And recording filtering conditions for determining records which need to be updated. The trigger condition is used to determine the condition for updating the balance table. And the operation direction is used for determining whether the field value of the target document 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, and 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, where the target operation state may be multiple, for example, the target document in an audit operation state or the target document in an anti-audit operation state, and the specific details are not limited herein. The operation direction is configured by the user based on the target operation state, for example, the auditing operation state corresponds to an increasing operation direction, and the anti-auditing operation state corresponds to a decreasing operation direction, which is not limited herein. The record filter condition may be a record filter condition of a null-value type filter value that is not configured by the user, or may be a record filter condition of a non-null-value type filter value that is configured by the user, and is not limited herein. For the record filtering condition of the null value type filtering value, the update engine model determines all records of the target document as the records for updating in the subsequent updating process, and for the record filtering condition of the non-null value type filtering value, the update engine model determines the records without the non-null value type filtering value from all records of the target document in the subsequent updating process, wherein the records are also used for updating. The mapping relation is the corresponding relation between the field names of the balance table and the target document, and the user selects the required field names with the same name based on the field names of the balance table and the target document so as to create the mapping relation, so that the mapping relation is the corresponding relation between the field names with the same name and the balance table and the target document.
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. Generating the balance update rule in response to the second operation, the balance update rule including the rule element.
And after receiving a second operation of creating the balance updating rule, the updating rule model generates the balance updating rule comprising the rule elements of the mapping relation, the triggering condition, the record filtering condition and the operation direction.
In the embodiment, a user can generate the balance table by only configuring the field name 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 receipt and the balance table on the interface for creating the balance updating rule, so that the balance table and the balance updating rule under various scenes do not need to be independently developed and formulated in the prior art, and repeated development is avoided.
Referring to fig. 3 based on fig. 2, the embodiment describes how the update engine model determines the target record, including:
301. and selecting alternative records meeting the filtering value from the target document.
After the update engine model obtains the filtering value of the record filtering condition, the alternative record meeting the filtering value is selected from all records of the target document, if the filtering value is a null value type filtering value, the update engine model determines all records of the target document as the record for updating, namely the alternative record, and if the filtering value is a non-null value type filtering value, the update engine model determines the record without the non-null value type filtering value, namely the alternative record, from all records of the target document. The alternative record can be one alternative record or a plurality of alternative records, and the field of the alternative record is the same as that 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 records, the update engine model selects field values corresponding to the field names of the mapping relations from the alternative records, and the field names of the mapping relations and the selected field values form target records.
It should be noted that the target record may be one target record or multiple target records, and a field of the target record may be the same as or different from a field of the target document, and is determined by the mapping relationship.
Referring to fig. 4, fig. 4 describes a process of generating a snapshot record by the update engine model according to the embodiment of fig. 3, including:
401. and analyzing the balance table to obtain the field names included in the balance table and the field attributes of the field names.
And the updating engine model analyzes the balance table so as to obtain the field name included by the balance table and the field attribute of the field name.
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 inquiring the field attribute of the associated field name.
Because the field names in the balance table carry field attributes, the update engine model queries the field attributes of the associated field names after determining the associated field names in the balance table.
404. And if the field attribute is a character attribute, extracting a field value corresponding to the field name of the target record from the target record.
And if the field attribute is inquired to be the character attribute by the updating engine model, the updating engine model extracts the 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 the field name of the target record from the target record, and calculating the field value according to the operation direction corresponding to the target operation state to obtain a target numerical value.
If the field attribute is queried to be the numerical value attribute by the update engine model, the update engine model extracts a field value corresponding to the field name of the target record from the target record, and operates 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 a sign.
Illustratively, if the target operation state is an audit operation state, the operation direction associated with the audit operation state is an increasing or increasing direction, the field value of the field name whose target record is a numerical attribute is 10, the field value of 10 is determined as a target numerical value of +10, and +10 is a target numerical value having an addend attribute, based on the operation direction being the increasing direction.
406. And generating the snapshot record according to the field value and/or the target numerical value.
After the field value in step 404 and/or the target value in 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 for generating a snapshot record, such as an SQL (Structured Query Language) instruction, according to a field name and a field value of the target record associated with each other and/or a field name and a target value of the target record associated with each other, and executes the database instruction to extract data from the target record and generate a snapshot record table, where the snapshot record table includes snapshot records, where a snapshot record may be a single snapshot record or multiple snapshot records, and the snapshot record or the snapshot record table may be used to trace back an update process of the balance table.
Referring to fig. 5 based on fig. 4, fig. 5 illustrates that the update engine model updates the balance table through the snapshot record, including:
501. and extracting a field name and a field value corresponding to the field name from the snapshot record.
The update engine model extracts the field names and the field values corresponding to the field names in the snapshot records.
502. And constructing a database instruction according to the field name and the field value.
And the updating engine model constructs a database instruction for updating the balance table according to the acquired field name and the acquired field value.
503. And executing the database instruction to update the record corresponding to the snapshot record in the balance table according to the snapshot record.
And the updating engine model executes a database instruction, extracts record data from the snapshot record and inquires a related record corresponding to the record data in the balance table, if the related record is inquired in the balance table, the related record is updated, and if the related record is not inquired, the record data is 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 apparatus, including:
a determining unit 601, configured to determine, if a request for updating a balance table by a target document is monitored, a balance updating rule associated with the target document and the balance table associated with the target document, where the target document is associated with a service scene;
a first analyzing unit 602, configured to analyze the balance update rule to obtain a rule element, where the rule element includes a record filtering condition and an operation direction;
a selecting unit 603, configured to select, from the target document, a target record that meets the record filtering condition;
an obtaining unit 604, configured to process the target record according to the operation direction to obtain a snapshot record;
an updating unit 605, 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 manner, the balance table updating apparatus 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;
a first response unit, configured to generate, in response to the first operation, a balance table including the field name, where the field name carries a field attribute;
a second receiving unit configured to receive a second operation of the user to create a balance update rule for updating the balance table;
a second response unit, configured to generate the balance update rule in response to the second operation, where the balance update rule includes 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 filter condition includes a filter value, and the selecting unit 603 includes:
the first selection subunit is used for selecting the alternative records meeting the filtering value from the target document;
and the second selection subunit selects a field value corresponding to the field name of the mapping relation from the candidate records, and forms a target record by the field name of the mapping relation and the selected field value.
In an implementation manner, the update request carries a target operation state of the target document, and the balance table updating apparatus 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, according to the mapping relationship, a field name corresponding to the field name of the target record in the balance table;
the query subunit is used for querying the field attribute of the associated field name;
a first extracting subunit, configured to, if the field attribute is queried by the querying subunit as a character attribute, extract a field value corresponding to a field name of the target record from the target record;
a second extracting subunit, configured to, if the field attribute is a numerical attribute, the querying subunit extracts a field value corresponding to the field name of the target record from the target record, and performs an operation on the field value according to an operation direction corresponding to the target operation state to obtain a target numerical value;
and the generating subunit is used for generating the snapshot record according to the field value or the target numerical value.
In one implementation, the updating unit 605 includes:
the extracting subunit is used for extracting the field names and the field values corresponding to the field names from the snapshot records;
the composition subunit is used for composing 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 apparatus according to an embodiment of the present application, where the balance table updating apparatus 701 may include one or more Central Processing Units (CPUs) 702 and a memory 706, and one or more applications or data are stored in the memory 706.
The memory 706 may be volatile storage or persistent storage, among others. The program stored in the memory 706 may include one or more modules, each of which may include a sequence of instructions operating on a server. Still further, the central processor 702 may be arranged to communicate with the memory 706 to execute a series of instruction operations in the memory 706 on the balance list updating apparatus 701.
The balance list update apparatus 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 list updating apparatus 701 may 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 apparatus 701 may perform the operations in the embodiments shown in any one of fig. 1 to fig. 5, and details thereof are not repeated herein.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to 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), a magnetic disk or an optical disk, and the like.

Claims (10)

1. A balance table updating method is 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 document to the balance table is monitored, determining a balance updating rule associated with the target document and the balance table associated with the target document, wherein the target document is associated with a business scene;
analyzing the balance updating rule to obtain a rule element, wherein the rule element comprises a record filtering condition and an operation direction;
selecting target records meeting the record filtering conditions from the target documents, and processing the target records according to the operation direction to obtain snapshot records;
and updating records corresponding to the snapshot records in the balance list according to the snapshot records to obtain a target balance list.
2. The balance table updating method according to claim 1, further comprising:
receiving a first operation of creating a field name by a user according to the service scene;
responding to the first operation, and generating a balance table containing the field names, wherein the field names carry field attributes;
receiving a second operation of the user to create a balance update rule for updating the balance table;
generating the balance update rule in response to the second operation, the balance update rule including the rule element.
3. The balance table updating method according to claim 1, wherein the rule element further includes a mapping relationship between field names between the balance table and target documents, and the record filter condition includes a filter value, and if the target record satisfying the record filter condition is selected from the target documents, the method includes:
selecting alternative records 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 3, wherein the update request carries a target operating state of the target document, the method further comprising:
analyzing the balance table to obtain field names included in the balance table and field attributes of the field names; then, the processing the target record according to the operation direction to obtain a snapshot record includes:
determining an associated field name corresponding to the field name of the target record in the balance table according to the mapping relation;
inquiring the field attribute of the associated field name;
if the field attribute is a character attribute, extracting a field value corresponding to the 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 the field name of the target record from the target record, and calculating the field value according to the 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 numerical value.
5. The method for updating a balance table according to claim 1, wherein the updating a record in the balance table corresponding to the snapshot record according to the snapshot record comprises:
extracting a field name and a field value corresponding to the field name from the snapshot record;
forming a database instruction according to the field names and the field values;
and executing the database instruction to update the record corresponding to the snapshot record in the balance table according to the snapshot record.
6. An apparatus for updating a balance table, comprising:
the determining unit is used for determining a balance updating rule associated with the target document and a balance table associated with the target document if a balance table updating request of the target document is monitored, wherein the target document is associated with a business scene;
the analysis unit is used for analyzing the balance updating rule to obtain a rule element, and the rule element comprises a record filtering condition and an operation direction;
the selecting unit is used for selecting the target records meeting the record filtering condition from the target documents;
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.
7. The balance table updating method according to claim 6, further comprising:
the first receiving unit is used for receiving a first operation of creating a field name according to the service scene by a user;
a first response unit, configured to generate, in response to the first operation, a balance table including the field name, where the field name carries a field attribute;
a second receiving unit configured to receive a second operation of the user to create a balance update rule for updating the balance table;
a second response unit, configured to generate the balance update rule in response to the second operation, where the balance update rule includes the rule element.
8. The balance table updating method according to claim 6, wherein the rule element further includes a mapping relationship between the balance table field name and a target document field name, and the record filtering condition includes a filtering value, and the selecting a target record satisfying the record filtering condition from the target document includes:
the first selection subunit is used for selecting the alternative records meeting the filtering value from the target document;
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.
9. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 5.
10. An apparatus for updating a balance table, comprising:
a central processing unit and a memory;
the central processor is configured to communicate with the memory, and to invoke the operation of instructions in the memory on the balance table updating device to perform the method of any one of claims 1 to 5.
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 true CN112988661A (en) 2021-06-18
CN112988661B 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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150112998A1 (en) * 2013-10-18 2015-04-23 Palantir Technologies Inc. Systems and user interfaces for dynamic and interactive simultaneous querying of multiple data stores
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

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150112998A1 (en) * 2013-10-18 2015-04-23 Palantir Technologies Inc. Systems and user interfaces for dynamic and interactive simultaneous querying of multiple data stores
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
UDAYAN KHURANA等: "Efficient snapshot retrieval over historical graph data", 《2013 IEEE 29TH INTERNATIONAL CONFERENCE ON DATA ENGINEERING》, pages 1 - 9 *
于洋: "基于企业信息资源目录的多源ETL模型的研究", 《中国优秀硕士学位论文全文数据库 经济与管理科学辑》, pages 152 - 752 *

Also Published As

Publication number Publication date
CN112988661B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN106951430B (en) Account table query method and device
JP5298117B2 (en) Data merging in distributed computing
US7509327B2 (en) Business data migration using metadata
CN110908997A (en) Data blood margin construction method and device, server and readable storage medium
CN111339171B (en) Data query method, device and equipment
CN110968380B (en) Data visualization method and system
CN109977099A (en) Database portion arranging method, user equipment, storage medium and device
CN108960672B (en) Quota and time-limited wind control method and device and computer readable storage medium
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
CN114722036A (en) Data processing method and device, electronic equipment and readable storage medium
CN114443015A (en) Method for generating adding, deleting, modifying and checking service interface based on database metadata
CN115827646B (en) Index configuration method and device and electronic equipment
CN110362540B (en) Data storage and visitor number acquisition method and device
CN112988661B (en) Balance table updating method and related equipment thereof
CN114036178A (en) Service interface generation method, device, computer and readable storage medium
US20140012632A1 (en) Extension of business scenarios
CN114218914A (en) Service matching method and related device
CN110597572B (en) Service call relation analysis method and computer system
CN112214532A (en) Service data auditing method and related device
CN116303627B (en) Query method and device for semiconductor test data, electronic equipment and storage medium
CN112948441B (en) Multi-dimensional data collection method and equipment for financial data
CN114237699B (en) Configuration script exporting method and device and storage medium
US20080016029A1 (en) Optimizing a query to a database
CN109933573B (en) Database service updating method, device and system

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