CN114116744A - Method, device and equipment for updating pull chain table and storage medium - Google Patents

Method, device and equipment for updating pull chain table and storage medium Download PDF

Info

Publication number
CN114116744A
CN114116744A CN202111396884.3A CN202111396884A CN114116744A CN 114116744 A CN114116744 A CN 114116744A CN 202111396884 A CN202111396884 A CN 202111396884A CN 114116744 A CN114116744 A CN 114116744A
Authority
CN
China
Prior art keywords
service data
target
data
service
pull
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.)
Pending
Application number
CN202111396884.3A
Other languages
Chinese (zh)
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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology 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 Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202111396884.3A priority Critical patent/CN114116744A/en
Publication of CN114116744A publication Critical patent/CN114116744A/en
Pending legal-status Critical Current

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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP

Landscapes

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

Abstract

The application discloses a method, a device, equipment and a storage medium for updating a pull chain table, and belongs to the technical field of internet. The method comprises the following steps: acquiring a target pull chain table corresponding to a target service; when the update period of a target pull chain table of the target service is reached, acquiring first service data in a data table corresponding to the target service at present, and acquiring second service data of which the corresponding chain sealing time is default time and the corresponding state indication information is an effective state; selecting third service data from the first service data based on the data identifier of the second service data; and adding the third service data into the target pull-up list, and setting the state indication information of the third service data added into the target pull-up list to be in an effective state. By the aid of the method and the device, efficiency of updating the pull chain table can be improved.

Description

Method, device and equipment for updating pull chain table and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, an apparatus, a device, and a storage medium for updating a pull chain table.
Background
The pull list is a data structure for storing information, which is commonly used in the field of data analysis and processing, and is commonly used for storing some service data of service history. For example, the service may be an express service, and the corresponding service data may be related information of an express order (e.g., an arrival location of an express, a sign-in status, etc.).
In the application process of the pull chain table, the pull chain table can be periodically updated. At each update, the service data generated in the current period may be acquired from the data table in which the service data is stored in full. And then determining whether the acquired service data is updated relative to the service data in the pull-linked list, and adding the updated service data to the data table.
The fields of the zipper table include an open-link time field and a close-link time field, and if the service data corresponding to the service object (such as a certain user, an express order, etc.) is initially added to the zipper table, the open-link time corresponding to the service data may be set as the time for adding the service data to the zipper table, and the close-link time corresponding to the service data may be set as a default time (which may be a preset maximum time, such as 9999-12-31). If the service data corresponding to the service object is updated, the updated service data can be added into the pull-up list, the chain sealing time of the corresponding previous service data is changed from the maximum time to the current time, and the chain sealing time corresponding to the updated service data is set as the maximum time. In this way, in the pull-chain table, the latest updated service data corresponding to the service object can be determined through the chain-sealing time, and the updating time of each service data can be determined through the chain-opening time.
The pull chain table needs to be periodically updated in the application process, that is, service data is periodically added to the pull chain table, and a large amount of service data needs to be processed each time of updating, so that the update efficiency of the pull chain table is low.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for updating a pull chain table, which can improve the efficiency of updating the pull chain table. The technical scheme is as follows:
in a first aspect, a method for updating a linked list is provided, where the method includes:
acquiring a target pull chain table corresponding to a target service;
when the update period of a target pull chain table of the target service is reached, acquiring first service data in a data table corresponding to the target service at present, and acquiring second service data of which the corresponding chain sealing time is default time and the corresponding state indication information is an effective state;
selecting third service data from the first service data based on the data identifier of the second service data;
and adding the third service data into the target pull-up list, and setting the state indication information of the third service data added into the target pull-up list to be in an effective state.
Optionally, before obtaining the target pull-up list corresponding to the target service, the method further includes:
determining at least one field corresponding to the data table of the target service;
determining the at least one field, the state indication information field, the open link time field and the closed link time field as fields corresponding to the target pull link list, and establishing the target pull link list;
and adding fourth service data included in the data table into the target pull-up list, and setting state indication information corresponding to the fourth service data added into the target pull-up list to be in an effective state.
Optionally, before determining at least one field corresponding to the data table of the target service, the method further includes:
acquiring at least two data tables corresponding to the target service;
determining the target number of the same service data in the at least two data tables;
and determining the ratio of the target number to the number of the service data in the data table of the target service, and determining that the ratio is greater than a preset ratio threshold.
Optionally, the selecting, based on the data identifier of the second service data, third service data from the first service data includes:
for any service data in the first service data, determining whether a data identifier of second service data includes a target data identifier corresponding to the any service data;
if the target data identifier corresponding to any service data is determined to be included, acquiring the target service data corresponding to the target data identifier in the second service data, sequentially comparing each field of the target service data with each field of any service data, and determining any service data as third service data when the target service data and any service data have different field values;
and if the target data identification corresponding to any service data is determined not to be included, determining any service data as third service data.
Optionally, the method further includes:
and when the storage duration of the fifth service data of which the corresponding state indication information is a valid state in the target pull-up list exceeds a duration threshold, setting the state indication information of the fifth service data to be in a failure state.
In a second aspect, an apparatus for updating a pull-list is provided, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a target pull chain table corresponding to a target service, acquiring first service data in a data table currently corresponding to the target service when an update cycle of the target pull chain table of the target service is reached, and acquiring second service data of which the corresponding chain sealing time is default time and the corresponding state indication information is an effective state;
a selecting module, configured to select third service data from the first service data based on the data identifier of the second service data;
and the adding module is used for adding the third service data into the target pull-up list and setting the state indication information of the third service data added into the target pull-up list to be in an effective state.
Optionally, the apparatus further includes a determining module, configured to:
determining at least one field corresponding to the data table of the target service;
determining the at least one field, the state indication information field, the open link time field and the closed link time field as fields corresponding to the target pull link list, and establishing the target pull link list;
and adding fourth service data included in the data table into the target pull-up list, and setting state indication information corresponding to the fourth service data added into the target pull-up list to be in an effective state.
Optionally, the determining module is further configured to:
acquiring at least two data tables corresponding to the target service;
determining the target number of the same service data in the at least two data tables;
and determining the ratio of the target number to the number of the service data in the data table of the target service, and determining that the ratio is greater than a preset ratio threshold.
Optionally, the selecting module is configured to:
for any service data in the first service data, determining whether a data identifier of second service data includes a target data identifier corresponding to the any service data;
if the target data identifier corresponding to any service data is determined to be included, acquiring the target service data corresponding to the target data identifier in the second service data, sequentially comparing each field of the target service data with each field of any service data, and determining any service data as third service data when the target service data and any service data have different field values;
and if the target data identification corresponding to any service data is determined not to be included, determining any service data as third service data.
Optionally, the apparatus further includes an update module, configured to:
and when the storage duration of the fifth service data of which the corresponding state indication information is a valid state in the target pull-up list exceeds a duration threshold, setting the state indication information of the fifth service data to be in a failure state.
In a third aspect, a computer device is provided, which includes a processor and a memory, where at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the operations performed by the method for updating a pull-list according to the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, the at least one instruction being loaded and executed by a processor to perform operations performed by the method for updating a pull-list according to the first aspect.
In a fifth aspect, a computer program product is provided, which includes at least one instruction that is loaded and executed by a processor to implement the operations performed by the method for updating a pull-list according to the first aspect.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
in the embodiment of the application, the state indication information field is added in the target pull chain table, and when the target pull chain table is updated each time, the service data with the corresponding chain sealing time as default time and the corresponding state indication information as an effective state can be obtained, so that the data volume of the service data participating in calculation when the pull chain table is updated can be reduced, and the efficiency of updating the pull chain table can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for updating a pull chain table according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for updating a pull chain table according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an apparatus for updating a pull-chain table according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The method for updating the pull chain table provided by the embodiment of the application can be realized by a server. The server may be a background server corresponding to various applications, websites, and the like, and may be used to process services provided by the corresponding applications and websites, such as processing express orders, advertisement pushing, and the like. The server may be provided with a processor and a memory. The memory may store an executive program corresponding to the method for updating the pull-chain table provided by the present application, and the processor may execute the executive program stored in the memory, thereby implementing the method for updating the pull-chain table provided by the present application. In addition, the server may be a single server or a server group, if the server is a single server, the server may be responsible for all processing in the following scheme, if the server is a server group, different servers in the server group may be respectively responsible for different processing in the following scheme, and the specific processing allocation condition may be arbitrarily set by a technical person according to actual needs, and is not described herein again.
In the present application, the data table is used for periodically storing the service data corresponding to the service object in the service. Such as the order status of express orders that can be daily, such as delivery location, sign-in status, etc. The data table can be divided into a full table and an increment table. The full table can be used for recording the current service data of all the service objects in each data statistical period. For example, when the service scenario is express order service, the full-scale table may record the status information of all express orders every day. The increment table can be used for recording the updated or newly added service data of all the service objects relative to the service data of the previous data counting period in each data counting period. For example, when the service scenario is an express order service, the incremental table may record the state information of the express order, which is newly added or updated with respect to the state information of the previous day.
The pull list is a data structure for storing information, which is commonly used in the field of data analysis and processing, and is commonly used for storing historical service data. For example, the service may be an express service, and the corresponding service data may be related information of an express order, such as an arrival location and a sign-in state of an express. The zipper table only stores updated service data, so that the data storage capacity is reduced equivalently to a full table, the service data of the same service object in the zipper table can be sequentially stored according to the time sequence, and the retrieval efficiency can be improved compared with an increment table when the service data corresponding to a certain service object is retrieved.
Technicians can determine the pull-list corresponding to the service according to the data table corresponding to each service. The pull list may be updated periodically. And each time the zipper table is updated, acquiring each service data in the data table corresponding to the target service, and determining that the service data is newly added or updated relative to the service data in the zipper table. And then adding the newly added or updated service data into the pull-chain table. However, all the service data in the zipper list needs to participate in the calculation of updating the zipper list, and the data volume in the zipper list may reach tens of millions and hundreds of millions along with each update, so that a large amount of service data participate in the calculation of updating the zipper list every time the zipper list is updated, and the updating efficiency of the zipper list is low.
The method for updating the pull chain table provided by the embodiment of the application can improve the updating efficiency of the pull chain table.
As shown in fig. 1, fig. 1 is a flowchart of a method for creating a zipper table according to an embodiment of the present application. Referring to fig. 1, the method is as follows:
step 101, determining at least one field corresponding to a data table of a target service.
The target service may be any service that needs to establish a pull-chain table. The data table for the target service may be an incremental table or a full table.
When the target service needs to establish the pull-up list, the field in the data table corresponding to the target service can be obtained and used as a part of the field in the pull-up list, and then the pull-up list is established. The fields in the linked list may include all the fields in the data table, or may be a part of the fields in the data table. For example, the zipper opening time field and the zipper closing time field are already included in the zipper table, and the fields related to the time information can be removed from the fields of the data table. Or, a technician may preset fields to be removed, after obtaining the fields of the pull-up list, may determine whether the fields of the pull-up list include the set fields to be removed, and if so, may remove the corresponding fields to obtain the fields for establishing the pull-up list.
In addition, one of the functions of setting the zipper list is to reduce the repetition degree of stored data, and if the data table corresponding to the target service is a full table, the repetition degree of generated data of the target service in different periods can be determined before the zipper list is set for the target service. Therefore, the present application further provides a method for determining whether a target service is suitable for establishing a zipper table, which can be applied before establishing a zipper table corresponding to the target service, and the method includes:
acquiring at least two data tables corresponding to a target service; determining the target number of the same service data in at least two data tables; and determining the ratio of the target number to the number of the service data in the data table, wherein the ratio is greater than a preset ratio threshold.
Before the zipper table is established for the target service, the full table recorded by the target service in at least two continuous periods can be obtained. After different full-scale tables are obtained, the number of the same service data in each full-scale table can be determined. For example, for the full-scale tables in two consecutive periods, the service data in one full-scale table may be sequentially compared with the service data in another full-scale table, the target number of the same service data is determined as a comparison result, and then a ratio of the target number to the number of all the service data included in the full-scale table may be calculated, where the ratio is the repetition degree of the generated data of the target service in different periods. If the ratio is determined to be larger than the preset ratio, it can be determined that the updated data of the target service in each period is not much, and the data amount of the stored service data is not obviously reduced even if the zipper table is established. On the contrary, if the ratio is determined to be smaller than or equal to the preset ratio, it can be determined that the updated data of the target service in each period is more, and therefore the data volume of the stored service data can be reduced by establishing the pull-chain table.
In addition, if the data table corresponding to the target service is an increment table, whether the increment table is suitable for establishing a corresponding zipper table can be determined according to whether the number of the service data included in the increment table corresponding to the target service exceeds a preset number threshold. Wherein, the number threshold value can be set by a technician according to the number corresponding to the target service including service.
If the target service is determined to be suitable for establishing the zipper table, each field in the data table corresponding to the target service can be obtained to be used as a part of fields in the zipper table, and then the zipper table is established.
Step 102, determining at least one field, a state indication information field, an open link time field and a closed link time field as fields corresponding to the target pull link list, and establishing the target pull link list.
After determining the fields for establishing the pull chain table in the data table, the corresponding fields, the preset state indication information fields, the open chain time fields and the closed chain time fields can be used as the fields of the target pull chain table to establish the target pull chain table. For example, the data table corresponding to the express order service includes "an express order number", "a departure place", "a destination", "a current arrival place", and "a sign-in state", and the like. The fields in the corresponding target pull list may include: "express delivery order number", "departure place", "destination", "current arrival place", "sign-in state", "state indication information", "open link time", and "close link time".
Step 103, adding the fourth service data included in the data table to the target pull-up list, and setting the state indication information corresponding to the fourth service data added to the target pull-up list to be in an effective state.
After the target pull-up list is established, the data in the data table of the target service can be added to the pull-up list according to the fields in the target pull-up list. Since the service data is added to the established target pull-linked list for the first time in step 103. The active state may be set for the traffic data added to the target pull-list. For each service data, the corresponding open-link time may be set as the time for adding the corresponding service data into the target pull-link list, and the corresponding close-link time for each service data may be set as a default time, for example, 9999-12-31. As shown in the following table i, the table i is a schematic example of a zipper table established for the express order service.
Watch 1
Figure BDA0003370633190000081
It should be noted that, only one method for establishing the zipper table is provided in the method flow of the present embodiment, and the method for updating the zipper table is not described here.
The embodiment of the application provides a method for establishing a zipper table, for any data table, the zipper table can be automatically established according to the corresponding data table, so that technicians can be prevented from compiling programs for correspondingly establishing the zipper table for each data table, and the development efficiency of the technicians can be improved.
Fig. 2 is a flowchart of a method for updating a pull-linked list according to an embodiment of the present disclosure. Referring to fig. 2, the method is as follows:
step 201, obtaining a target pull chain table corresponding to a target service.
Wherein, the target pull chain table may be the pull chain table established based on the method for establishing the pull chain table provided in the above step 101-103. That is, the target pull-up list includes a status indication information field in addition to a field corresponding to the service data, an open link time field, and a close link time field. It should be noted that the method for updating the pull list provided in the embodiment of the present application may be implemented on the basis that the data table corresponding to the target service is a full table.
Step 202, when the update cycle of the target pull-up list of the target service is reached, acquiring first service data in a data table currently corresponding to the target service, and acquiring second service data in which the corresponding link sealing time in the target pull-up list is default time and the corresponding state indication information is an effective state.
The zipper table of the target service may be updated according to a preset update period, which may be set by a technician, and may be consistent with a record period corresponding to the data table of the target service, for example, the update period may be set to 1 day.
And when the update period of the pull-linked list corresponding to the target service is reached, the data table of the target service in the current update period can be acquired. And acquiring first service data in the data table, and taking the corresponding chain sealing time as default time and the corresponding state indication information as second service data of the effective state in the zipper table.
If the target pull-up list is updated for the first time, the link sealing time of all the service data of the target pull-up list is the default time, and the state indication information corresponding to all the service data can be in the effective state. If the target pull-up list is not updated for the first time, the link sealing time corresponding to the service data in the target pull-up list is a non-default time, and the state indication information corresponding to the service data may be in a failure state. In the updating process, the processing of changing the chain-sealing time and the state indication information corresponding to the service data is not described here first.
Step 203, selecting third service data from the first service data based on the data identifier of the second service data.
The data identifier may be a primary key in the service data, and a technical person may set a certain field in the service data as a primary key corresponding to the service data in advance, for example, the data identifier may be an identifier corresponding to a service to which the service data belongs, such as a user ID, an order ID, and the like.
After the first service data and the second service data are determined, third service data which needs to be added to the pull-list can be selected from the first service data. Specifically, each service data in the first service data may be compared with each service data in the second service data, and it is determined in the first service data that there is newly added or updated service data (i.e., third service data) with respect to each service data in the second service data, and the corresponding processing is as follows:
for any service data in the first service data, determining whether the data identifier of the second service data comprises a target data identifier corresponding to any service data; if the target data identification corresponding to any service data is determined to be included, acquiring target service data corresponding to the target data identification in the second service data, sequentially comparing each field of the target service data with each field of any service data, and determining any service data as third service data when the target service data and any service data have different field values; and if the target data identification corresponding to any service data is determined not to be included, determining any service data as third service data.
The data identifier corresponding to each service data in the first service data may be sequentially obtained. After a service identifier (hereinafter, referred to as a target service identifier) in a first service data is obtained, it may be determined whether a target service identifier exists in service identifiers corresponding to service data of a second service data. If the target service identification does not exist. If the service data corresponding to the current target service identifier is the newly added service data, the service data may be the third service data. If the target service identifier exists, the two service data respectively corresponding to the target service data identifier can be compared. For example, the fields in the two service data may be compared in sequence, and when there is a difference between the corresponding fields, the service data corresponding to the target data identifier in the first service data may be determined as the third service data, that is, the third service data is updated service data with respect to the second service data.
And 204, adding the third service data into the target pull-up list, and setting the state indication information of the third service data added into the target pull-up list to be in an effective state.
If the third service data is newly added service data relative to the service data in the target pull-up list, that is, the target pull-up list does not include service data having the same data identifier as the third service data, the third service data may be added at the end of the target pull-up list. And setting the open link time corresponding to the third service data as the time for adding the third service data into the target pull link list, and setting the close link time corresponding to the third service data as the maximum time. And setting the state indication information of the third service data to be in an effective state. For example, the target zip list is a zip list corresponding to the express order, and when the third service data is newly added service data, the third service data is added to the target zip list, which may be as shown in the following table two. And the order number is a data identifier corresponding to the service data. The service data corresponding to the order number "000004" is the newly added service data.
Watch two
Figure BDA0003370633190000101
If the third service data is the updated or changed service data corresponding to a certain service data in the target pull-up list, that is, the target pull-up list already includes the service data having the same data identifier as the third service data, but the service data and the third service data have different fields, the third service data may be added to the next line of the service data in the edge-pulling list. And setting the open link time corresponding to the third service data as the time for adding the third service data into the target pull link list, and setting the close link time corresponding to the third service data as the maximum time. And setting the state indication information of the third service data to be in an effective state. And changing the chain closing time corresponding to the service data into the current time (namely the open chain time of the third service data). As shown in table two above. In the second table, the second service data corresponding to the order number "000003" is the third service data added to the pull-up list, and the second service data is updated with respect to the first service data corresponding to the order number "000003" in the pull-up list.
In addition, when the storage duration of the fifth service data of which the corresponding state indication information is the validity state in the target pull-up list exceeds a duration threshold, the state indication information of the fifth service data is set to be in a failure state.
In implementation, after the pull-up list is updated each time, the state indication information corresponding to each service data in the pull-up list can be updated. After the third service data is added to the pull-up list each time, the state indication information corresponding to each service data in the pull-up list may be updated. That is, it may be determined that the corresponding state indication information in the current pull-up list is service data in an effective state, and then, a storage duration of the corresponding service data is determined, and when the storage duration is greater than a preset duration threshold, the state indication information of the corresponding service data may be modified from the effective state to the invalid state. The time threshold value can be preset by a technician according to the actual service scene corresponding to the target zipper table. And determining the storage time length of the service data in the zipper list, wherein the storage time length can be determined according to the difference value of the corresponding zipper opening time and the current time of the zipper list.
It can be seen that, in the pull-up list provided by the present application, each service data corresponds to a state indication information, and when the storage duration of the service data in the pull-up list exceeds a duration threshold, the state indication information of the service data can be changed from an effective state to an ineffective state. When the pull chain table is updated next time, the service data corresponding to the failure state in the pull chain table does not participate in the comparison processing with the service data in the data table, so that the calculation amount during updating of the pull chain table is reduced, and the efficiency of updating the pull chain table can be improved.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
Fig. 3 is a device for updating a linked list according to an embodiment of the present application, where the device may be a server in the foregoing embodiment, and the device includes:
an obtaining module 310, configured to obtain a target pull-up list corresponding to a target service, and when an update period of the target pull-up list of the target service is reached, obtain first service data in a data table currently corresponding to the target service, and obtain second service data in which a corresponding link sealing time in the target pull-up list is a default time and corresponding state indication information is an effective state;
a selecting module 320, configured to select third service data from the first service data based on the data identifier of the second service data;
an adding module 330, configured to add the third service data to the target pull-up list, and set the state indication information of the third service data added to the target pull-up list to be in an effective state.
Optionally, the apparatus further includes a determining module, configured to:
determining at least one field corresponding to the data table of the target service;
determining the at least one field, the state indication information field, the open link time field and the closed link time field as fields corresponding to the target pull link list, and establishing the target pull link list;
and adding fourth service data included in the data table into the target pull-up list, and setting state indication information corresponding to the fourth service data added into the target pull-up list to be in an effective state.
Optionally, the determining module is further configured to:
acquiring at least two data tables corresponding to the target service;
determining the target number of the same service data in the at least two data tables;
and determining the ratio of the target number to the number of the service data in the data table of the target service, and determining that the ratio is greater than a preset ratio threshold.
Optionally, the selecting module 320 is configured to:
for any service data in the first service data, determining whether a data identifier of second service data includes a target data identifier corresponding to the any service data;
if the target data identifier corresponding to any service data is determined to be included, acquiring the target service data corresponding to the target data identifier in the second service data, sequentially comparing each field of the target service data with each field of any service data, and determining any service data as third service data when the target service data and any service data have different field values;
and if the target data identification corresponding to any service data is determined not to be included, determining any service data as third service data.
Optionally, the apparatus further includes an update module, configured to:
and when the storage duration of the fifth service data of which the corresponding state indication information is a valid state in the target pull-up list exceeds a duration threshold, setting the state indication information of the fifth service data to be in a failure state.
It should be noted that: the apparatus for updating a linked list provided in the foregoing embodiment is only illustrated by dividing the functional modules when updating the linked list, and in practical applications, the function allocation may be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for updating a linked list and the method embodiment for updating a linked list provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
Fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present application, where the computer device 400 may be a server according to the foregoing embodiments, and the computer device 400 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (cpus) 401 and one or more memories 402, where the memories 402 store at least one instruction, and the at least one instruction is loaded and executed by the processors 401 to implement the methods according to the foregoing method embodiments. Certainly, the computer device may further have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and the server may further include other components for implementing the functions of the device, which is not described herein again.
In an exemplary embodiment, a computer program product is also provided, where the computer program product includes at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the method for updating a pull-list provided by the above method embodiments.
In an exemplary embodiment, a computer-readable storage medium, such as a memory including instructions executable by a processor in a terminal, is also provided to perform the method of updating a linked list in the above embodiments. The computer readable storage medium may be non-transitory. For example, the computer-readable storage medium may be a ROM (read-only memory), a RAM (random access memory), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (13)

1. A method of updating a linked list, the method comprising:
acquiring a target pull chain table corresponding to a target service;
when the update period of a target pull chain table of the target service is reached, acquiring first service data in a data table corresponding to the target service at present, and acquiring second service data of which the corresponding chain sealing time is default time and the corresponding state indication information is an effective state;
selecting third service data from the first service data based on the data identifier of the second service data;
and adding the third service data into the target pull-up list, and setting the state indication information of the third service data added into the target pull-up list to be in an effective state.
2. The method according to claim 1, wherein before the obtaining of the target pull list corresponding to the target service, the method further comprises:
determining at least one field corresponding to the data table of the target service;
determining the at least one field, the state indication information field, the open link time field and the closed link time field as fields corresponding to the target pull link list, and establishing the target pull link list;
and adding fourth service data included in the data table into the target pull-up list, and setting state indication information corresponding to the fourth service data added into the target pull-up list to be in an effective state.
3. The method of claim 2, wherein before determining at least one field corresponding to the data table of the target service, the method further comprises:
acquiring at least two data tables corresponding to the target service;
determining the target number of the same service data in the at least two data tables;
and determining the ratio of the target number to the number of the service data in the data table of the target service, and determining that the ratio is greater than a preset ratio threshold.
4. The method of claim 1, wherein the selecting third service data from the first service data based on the data identifier of the second service data comprises:
for any service data in the first service data, determining whether a data identifier of second service data includes a target data identifier corresponding to the any service data;
if the target data identifier corresponding to any service data is determined to be included, acquiring the target service data corresponding to the target data identifier in the second service data, sequentially comparing each field of the target service data with each field of any service data, and determining any service data as third service data when the target service data and any service data have different field values;
and if the target data identification corresponding to any service data is determined not to be included, determining any service data as third service data.
5. The method of claim 1, further comprising:
and when the storage duration of the fifth service data of which the corresponding state indication information is a valid state in the target pull-up list exceeds a duration threshold, setting the state indication information of the fifth service data to be in a failure state.
6. An apparatus for updating a linked list, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a target pull chain table corresponding to a target service, acquiring first service data in a data table currently corresponding to the target service when an update cycle of the target pull chain table of the target service is reached, and acquiring second service data of which the corresponding chain sealing time is default time and the corresponding state indication information is an effective state;
a selecting module, configured to select third service data from the first service data based on the data identifier of the second service data;
and the adding module is used for adding the third service data into the target pull-up list and setting the state indication information of the third service data added into the target pull-up list to be in an effective state.
7. The apparatus of claim 6, further comprising a determination module configured to:
determining at least one field corresponding to the data table of the target service;
determining the at least one field, the state indication information field, the open link time field and the closed link time field as fields corresponding to the target pull link list, and establishing the target pull link list;
and adding fourth service data included in the data table into the target pull-up list, and setting state indication information corresponding to the fourth service data added into the target pull-up list to be in an effective state.
8. The apparatus of claim 7, wherein the determining module is further configured to:
acquiring at least two data tables corresponding to the target service;
determining the target number of the same service data in the at least two data tables;
and determining the ratio of the target number to the number of the service data in the data table of the target service, and determining that the ratio is greater than a preset ratio threshold.
9. The apparatus of claim 6, wherein the selecting module is configured to:
for any service data in the first service data, determining whether a data identifier of second service data includes a target data identifier corresponding to the any service data;
if the target data identifier corresponding to any service data is determined to be included, acquiring the target service data corresponding to the target data identifier in the second service data, sequentially comparing each field of the target service data with each field of any service data, and determining any service data as third service data when the target service data and any service data have different field values;
and if the target data identification corresponding to any service data is determined not to be included, determining any service data as third service data.
10. The apparatus of claim 6, further comprising an update module to:
and when the storage duration of the fifth service data of which the corresponding state indication information is a valid state in the target pull-up list exceeds a duration threshold, setting the state indication information of the fifth service data to be in a failure state.
11. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction that is loaded and executed by the processor to perform operations performed by the method of updating a pull-list of any of claims 1 to 5.
12. A computer-readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to perform operations performed by a method of updating a pull-list according to any one of claims 1 to 5.
13. A computer program product comprising at least one instruction loaded and executed by a processor to perform operations performed by the method of updating a pull-list of any one of claims 1 to 5.
CN202111396884.3A 2021-11-23 2021-11-23 Method, device and equipment for updating pull chain table and storage medium Pending CN114116744A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111396884.3A CN114116744A (en) 2021-11-23 2021-11-23 Method, device and equipment for updating pull chain table and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111396884.3A CN114116744A (en) 2021-11-23 2021-11-23 Method, device and equipment for updating pull chain table and storage medium

Publications (1)

Publication Number Publication Date
CN114116744A true CN114116744A (en) 2022-03-01

Family

ID=80440344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111396884.3A Pending CN114116744A (en) 2021-11-23 2021-11-23 Method, device and equipment for updating pull chain table and storage medium

Country Status (1)

Country Link
CN (1) CN114116744A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383228A (en) * 2023-06-05 2023-07-04 建信金融科技有限责任公司 Data processing method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383228A (en) * 2023-06-05 2023-07-04 建信金融科技有限责任公司 Data processing method, device, computer equipment and storage medium
CN116383228B (en) * 2023-06-05 2023-08-25 建信金融科技有限责任公司 Data processing method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110321387B (en) Data synchronization method, equipment and terminal equipment
CN106055630A (en) Log storage method and device
CN102668456A (en) Method and system for adapting a session timeout period
CN110602227B (en) Intelligent contract management method and related device
CN108875035B (en) Data storage method of distributed file system and related equipment
CN114116744A (en) Method, device and equipment for updating pull chain table and storage medium
CN114282011B (en) Knowledge graph construction method and device, and graph calculation method and device
CN111064776A (en) Method and device for generating blocks in block chain and storage medium
CN108063814B (en) Load balancing method and device
CN116796552B (en) Simulation thinking asynchronous cooperative processing method and device
CN110876072A (en) Batch registered user identification method, storage medium, electronic device and system
CN111367916B (en) Data storage method and device
CN110347973B (en) Method and device for generating information
CN111159142B (en) Data processing method and device
CN115827646A (en) Index configuration method and device and electronic equipment
CN109213513B (en) Method and device for determining share ratio of software and computer readable storage medium
CN112448855B (en) Method and system for updating block chain system parameters
CN112148551B (en) Method, apparatus and computer program product for determining a rate of change of usage of a storage system
CN114064678A (en) Event data processing method and device and terminal equipment
CN107633028B (en) Dynamic data collision association method and system
CN113312368A (en) Relational data updating method and device, electronic equipment and storage medium
CN106469086B (en) Event processing method and device
CN112508518A (en) RPA flow generation method combining RPA and AI, corresponding device and readable storage medium
CN109783580A (en) Method of data synchronization and device
CN113157048B (en) Behavior data analysis method based on multi-terminal time axis and related components

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