File pushing method and device between business systems and storage medium
By embedding a file push module in the form of a dependency package into the business system, and using scheduled tasks and interface calls to push files between different systems, the high cost problem caused by writing file push functions separately for each system in the existing technology is solved, thus achieving cost reduction and efficiency improvement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SMCAIOT
- Filing Date
- 2024-05-14
- Publication Date
- 2026-04-10
AI Technical Summary
When pushing files between different business systems, existing technologies require writing file push functionality separately for each system, resulting in excessive costs.
By embedding a file push module in the form of a dependency package into the business system, and using scheduled tasks to call system interfaces and remote interfaces, files can be pushed between different systems, thus decoupling them from the business system itself.
It reduces the cost of file pushing between business systems and improves code reusability and file pushing efficiency.
Smart Images

Figure CN118337778B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of file pushing, in particular to a file pushing method between business systems, equipment and a storage medium. BACKGROUND
[0002] In the application fields of cloud computing, big data and Internet of Things, a large number of files need to be pushed between different business systems to realize the synchronization of files between different business systems. However, when realizing the file pushing between different business systems, the technical personnel usually directly writes the file pushing function in the corresponding business system, and if there are multiple business systems, the file pushing function needs to be written for each business system separately, so that the file pushing cost between business systems is too high.
[0003] Therefore, how to reduce the file pushing cost between business systems is a technical problem to be solved at present. SUMMARY
[0004] Embodiments of the present application provide a file pushing method between business systems, equipment and a storage medium, aiming to reduce the file pushing cost between business systems.
[0005] In one aspect, the present application provides a file pushing method between business systems, which is applied to a terminal, the terminal comprising a first business system and a first file pushing module, the first business system being provided with a first file query interface and a first synchronization callback interface, and the first file pushing module being embedded into the first business system in the form of a dependent package, the method comprising:
[0006] triggering a file pushing task in the first file pushing module at a regular time;
[0007] when the file pushing task is triggered, calling the first file query interface to query the first file to be pushed to a second business system in the first business system by using the first file query interface, and obtaining a file identifier of the first file;
[0008] based on the file identifier, downloading the first file, sending the first file to a second remote interface to call the second remote interface, and storing the first file into the second business system by using the second remote interface, the second file pushing module embedded into the second business system comprising the second remote interface;
[0009] when receiving a storage success message fed back by the second remote interface, calling the first synchronization callback interface to modify the file state of the first file in the first business system from a first state to a second state by using the first synchronization callback interface.
[0010] In some embodiments, the first file pushing module comprises a first remote interface, and the method further comprises:
[0011] When the first remote interface is invoked, the second file received by the first remote interface is stored into the first business system by using the first remote interface, and the second file is from the second business system;
[0012] When the storage address of the second file in the first business system is received, a storage success message is fed back to the second file pushing module, so that the second file pushing module invokes a second synchronous callback interface in the second business system, and the file state of the second file in the second business system is modified from a first state to a second state by using the second synchronous callback interface.
[0013] In some embodiments, the first business system is provided with a first file compression interface, and the method further comprises:
[0014] The file compression task in the first file pushing module is triggered at a time;
[0015] When the file compression task is triggered, the first file compression interface is invoked to query the download address of the to-be-compressed file in the first business system by using the first file compression interface;
[0016] The to-be-compressed file is downloaded according to the download address, and file compression processing is performed on the to-be-compressed file to obtain the first file;
[0017] The first file is uploaded into the first business system to obtain an upload address of the first file, and the file identifier comprises the upload address.
[0018] In some embodiments, the downloading of the to-be-compressed file, the uploading of the first file, and the downloading of the first file are all executed based on a same preset file processing program in the first file pushing module.
[0019] In some embodiments, the downloading of the first file based on the file identifier comprises:
[0020] File server configuration information associated with the first business system is obtained;
[0021] A target file server corresponding to the file server configuration information is determined;
[0022] The first file is downloaded from the target file server based on the file identifier.
[0023] In some embodiments, the calling the first file query interface to query the first file in the first business system to be pushed to the second business system by using the first file query interface comprises:
[0024] calling the first file query interface to acquire the file query mode set in the first business system by using the first file query interface;
[0025] querying the first file in the first business system to be pushed to the second business system according to the file query mode by using the first file query interface.
[0026] In some embodiments, the method further comprises:
[0027] detecting whether the configuration file and the configuration database table of the first file pushing module exist simultaneously in the terminal;
[0028] if the configuration file and the configuration database table exist simultaneously in the terminal, executing the step of triggering the file pushing task in the first file pushing module at the timing according to the priority of the configuration file and the configuration database table.
[0029] In some embodiments, the dependent package used when the first file pushing module is embedded into the first business system is the same as the dependent package used when the second file pushing module is embedded into the second business system.
[0030] In another aspect, the present application also provides a computer device, which comprises:
[0031] one or more processors;
[0032] a memory; and
[0033] one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the steps in the file pushing method between business systems.
[0034] In another aspect, the present application also provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is loaded by a processor to execute the steps in the file pushing method between business systems.
[0035] In another aspect, the present application embodiments provide a computer program product comprising computer programs or instructions, which are executed by a processor to implement the file pushing method between business systems as described in any one of the above.
[0036] The file pushing method, device and storage medium between business systems provided by the embodiments of the present application embed a first file pushing module in the form of a dependent package into a first business system, trigger a file pushing task in the first file pushing module at a fixed time, call a first file query interface and a first synchronous callback interface in the first business system, and a second remote interface of a second file pushing module embedded into a second business system, push a file from the first business system to the second business system, so that the file pushing function between different business systems is decoupled from the business systems, and only a small number of interfaces for calling need to be set in the business systems, and the file pushing function between business systems is reduced. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0038] Figure 1 is a file pushing relationship between a first business system and a second business system provided in the embodiments of the present application;
[0039] Figure 2 is an embodiment flowchart of a file pushing method between business systems provided in the embodiments of the present application;
[0040] Figure 3 is another embodiment flowchart of a file pushing method between business systems provided in the embodiments of the present application;
[0041] Figure 4 is still another embodiment flowchart of a file pushing method between business systems provided in the embodiments of the present application;
[0042] Figure 5 is an embodiment structure diagram of a computer device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0044] In the description of the present application, the terms "first", "second" are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise specifically limited.
[0045] In the present application, the word "some embodiments" is used to mean "serving as an example, instance, or illustration". Any embodiment described as "some embodiments" in the present application is not necessarily to be construed as preferred or advantageous over other embodiments. In order to enable any person skilled in the art to implement and use the present application, the following description is given. In the following description, details are listed for the purpose of explanation. It should be understood that those skilled in the art can realize the present application without using these specific details. In other examples, well-known structures and processes will not be described in detail to avoid unnecessary details making the description of the present application obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope in accordance with the principles and characteristics disclosed in the present application.
[0046] The embodiments of the present application provide a file pushing method between business systems, equipment and storage medium, which are described in detail below.
[0047] The file pushing method between business systems provided in the embodiments of the present application is described by taking file pushing between a first business system and a second business system as an example.
[0048] Please refer to Figure 1 , the first file pushing module is embedded in the first business system in the form of a dependency package, and the second file pushing module is embedded in the second business system in the form of a dependency package. The first business system and the second business system run on different terminals. The dependency package refers to a software package of an independent module that the corresponding business system depends on. For example, the first file pushing module is embedded into the first business system as an independent module, rather than being formed integrally with the first business system. Therefore, the first file pushing module can be decoupled from the first business system, and separated from the first business system, thereby improving the reusability of the code in the first file pushing module, for example, the code in the first file pushing module can be reused in the second file pushing module.
[0049] In Figure 1In this way, the first file is pushed to the second file pushing module by the first file pushing module, so as to realize pushing of the first file from the first business system to the second business system. In order to realize the adaptation between the first file pushing module and the first business system, only a small number of interfaces for calling need to be set in the first business system by the relevant technical personnel, and a complete file pushing function does not need to be written in the first business system, so as to reduce the file pushing cost between the business systems. Taking the first business system as an example, the interfaces for calling that need to be set in the first business system can include a first file query interface and a first synchronous callback interface. The first file query interface is used to be called to query the first file in the first business system that needs to be pushed to the second business system, that is, to provide the file query function in the first business system. The first synchronous callback interface is used to feed back the corresponding processing result after the file pushing processing between the first business system and the second business system is completed, for example, after the pushing processing of the first file is completed, the file state of the first file in the first business system is modified from a first state to a second state, wherein the first state can be an unsynchronized state, and the second state can be a synchronized state.
[0050] Please refer to Figure 2 , Figure 2 This is an embodiment flowchart of the file pushing method between the business systems provided in the embodiments of the present application. In Figure 1 the embodiment shown, the file pushing method between the business systems is applied to a terminal, and the terminal includes a first business system and a first file pushing module. The method can be executed by the first file pushing module in the terminal, and the method specifically can include:
[0051] 201, triggering a file pushing task in the first file pushing module in a time manner.
[0052] In this embodiment, a plurality of different file related tasks are set in the first file pushing module, such as a file pushing task, a file compression task, and the like. Each file related task in the first file pushing module is generally triggered to be executed in a time manner, for example, the file pushing task in the first file pushing module is triggered in a time manner.
[0053] 202, when the file pushing task is triggered, calling the first file query interface to query the first file in the first business system that needs to be pushed to the second business system by using the first file query interface, and obtaining the file identifier of the first file.
[0054] In the embodiment, when the file pushing task is triggered, a first file query interface provided by the first business system is called to query the files to be pushed to the second business system in the first business system by a file query function in the first business system, and a query result is obtained. The query result is usually a list of the files to be pushed to the second business system in the first business system, and the list includes the file identifier of the first file to be pushed to the second business system in the first business system. The file identifier of the first file can include the name of the first file, the storage address of the first file in the first business system, and the like.
[0055] In some embodiments, calling the first file query interface to query the first file to be pushed to the second business system in the first business system by the first file query interface can include: calling the first file query interface to obtain the file query mode (for example, mysql, pgsql, oracle, redis, and the like) set in the first business system by the first file query interface; and querying the first file to be pushed to the second business system in the first business system by the first file query interface according to the file query mode. It can be seen that the file query mode described above is set in the first business system, rather than in the first file pushing module, so that the developer of the first business system can have greater freedom, and the developer can set the file query mode corresponding to the first business system based on the characteristics of the first business system, so that the file query mode is more matched with the first business system, and it is not necessary to be limited to a certain file query mode that can be attached to the first file pushing module.
[0056] 203、Based on the file identifier, the first file is downloaded, and the first file is sent to the second remote interface to call the second remote interface and store the first file to the second business system by the second remote interface. The second file pushing module embedded in the second business system includes the second remote interface.
[0057] In the embodiment, the first file in the first business system is found and downloaded based on the file identifier, for example, the first file in the first business system can be found and downloaded based on at least one of the name of the first file and the storage address of the first file in the first business system. The storage address of the first file in the first business system can be a storage address local to the first business system, or an address in a specified file server mounted by the first business system.
[0058] In the embodiment, the second file pushing module embedded into the second service system is provided with a second remote interface, the second remote interface is used for receiving data sent by a remote terminal and being remotely called by the remote terminal, for example, a terminal where the first service system is located. In order to transmit the first file from the first service system to the second service system, the address of the second remote interface can be pre-configured in the first file pushing module, so that the first file is sent to the second remote interface according to the address of the second remote interface, the second remote interface is called, and the first file is stored in the second service system by using the second remote interface, for example, the first file is uploaded to a specified file server mounted by the second service system.
[0059] In some embodiments, after the first file pushing module is embedded into the first service system in the form of a dependent package, the first file pushing module can also be configured, for example, a server address in the first service system for storing the first file to be pushed can be configured. Taking the need to configure the file server address in the first service system for storing the first file to be pushed as an example, downloading the first file based on the file identifier can include: obtaining file server configuration information associated with the first service system, the file server configuration information including the file server address in the first service system for storing the first file to be pushed; determining a target file server corresponding to the file server configuration information, for example, the target file server can be a specified file server mounted by the first service system; and downloading the first file from the target file server based on the file identifier, so as to ensure correct downloading of the first file.
[0060] In some embodiments, the processing after the second remote interface in the second service system is called is explained. Specifically, when the second remote interface is called, the second file pushing module can store the first file received by the second remote interface in the second service system by using the second remote interface; when the storage address of the first file in the second service system is received, the second file pushing module feeds back a storage success message to the first file pushing module, so that the first file pushing module modifies the file state of the first file in the first service system when the storage success message fed back by the second file pushing module is received.
[0061] 204、In the embodiment, the processing after the second remote interface in the second service system is called is explained. Specifically, when the second remote interface is called, the second file pushing module can store the first file received by the second remote interface in the second service system by using the second remote interface; when the storage address of the first file in the second service system is received, the second file pushing module feeds back a storage success message to the first file pushing module, so that the first file pushing module modifies the file state of the first file in the first service system when the storage success message fed back by the second file pushing module is received.
[0062] In this embodiment, when a storage success message is received from the second remote interface, it indicates that the second business system has successfully stored the first file. Therefore, the first synchronization callback interface can be called to change the file status of the first file in the first business system from the first status to the second status, thereby ensuring the correctness of the file status of the first file in the first business system.
[0063] In some embodiments, the first business system stores the file states of multiple different files to distinguish which files are the first files to be pushed to the second business system and which have already been successfully pushed to the second business system. Therefore, when querying the first file to be pushed to the second business system using the first file query interface, the first file query interface is used to query the file states of multiple files stored in the first business system, thereby sequentially identifying files with the first state as the first files. Similarly, the second business system stores the file states of multiple different files. The function of the file states in the second business system is similar to that in the first business system, and will not be elaborated upon here.
[0064] The file push method between business systems provided in this application embeds a first file push module into a first business system as a dependency package. By periodically triggering the file push task in the first file push module, the first file query interface and the first synchronization callback interface in the first business system, as well as the second remote interface of the second file push module embedded in the second business system, are called to push files from the first business system to the second business system. This decouples the file push function between different business systems from the business system, and only requires setting a few interfaces in the business system for calling, without having to write file push functions separately for each business system, thereby reducing the cost of file push between business systems.
[0065] like Figure 3 As shown, in Figure 2 Based on the illustrated embodiment, the first file push module includes a first remote interface. The file push method between business systems can be executed by the first file push module in the terminal, and the method may further include:
[0066] 301. When the first remote interface is invoked, the second file received by the first remote interface is stored in the first business system using the first remote interface. The second file originates from the second business system.
[0067] In this embodiment, similar to the need for the first business system to push the first file to the second business system, the second business system may also have a need to push the second file in the second business system to the first business system. Therefore, withFigure 2 The "calling the second remote interface" in the illustrated embodiment is similar, and the first remote interface can also be called by the second file pushing module. When the first remote interface is called, the second file received by the first remote interface is stored to the first business system by using the first remote interface, for example, the second file is uploaded to a specified file server mounted by the first business system.
[0068] 302、Upon receiving the storage address of the second file in the first business system, a storage success message is fed back to the second file pushing module, so that the second file pushing module calls the second synchronization callback interface in the second business system to modify the file state of the second file in the second business system from the first state to the second state by using the second synchronization callback interface.
[0069] In this embodiment, after storing the second file to the first business system, the first file pushing module can feed back a storage success message to the second file pushing module, so that the second file pushing module calls the second synchronization callback interface in the second business system to modify the file state of the second file in the second business system from the first state to the second state, thereby ensuring the correctness of the file state of the second file in the second business system.
[0070] In some embodiments, the dependency package used when the first file pushing module is embedded into the first business system is the same as the dependency package used when the second file pushing module is embedded into the second business system, that is, the same dependency package is embedded into the first business system and the second business system respectively, forming the first file pushing module in the first business system and the second file pushing module in the second business system respectively, so that the dependency package can be reused between different business systems, further reducing the pushing cost of files between different business systems.
[0071] The file pushing method between business systems provided by the embodiments of the present application realizes bidirectional pushing of files between the first business system and the second business system through the cooperation of the first file pushing module and the second file pushing module, thereby ensuring the consistency of files in the first business system and the second business system.
[0072] As shown in the above Figure 4 As shown in the above Figure 2 Or Figure 3 On the basis of the embodiments shown in the above, a first file compression interface is arranged in the first business system. The file pushing method between business systems can be executed by the first file pushing module in the terminal, and the method can further include:
[0073] 401、Timing triggers a file compression task in the first file pushing module.
[0074] In the embodiment, since the file pushed between the first service system and the second service system can be large, a compression function of the file can also be provided to reduce the time consumption of file transmission. Specifically, the file compression task is arranged in the first file pushing module, and the file compression task can also be triggered and executed in a timing task manner, similar to the file pushing task.
[0075] 402. When the file compression task is triggered, the first file compression interface is called to query the download address of the file to be compressed in the first service system by using the first file compression interface.
[0076] In the embodiment, when the file compression task is triggered, the first file pushing module can call the first file compression interface to query the download address of the file to be compressed in the first service system by using the first file compression interface. It can be understood that, in order to enable the first service system to provide the query function of the download address of the file to be compressed, the related technical personnel can arrange the first file compression interface in the service system in advance to be called by the first file pushing module.
[0077] 403. The file to be compressed is downloaded according to the download address, and file compression processing is performed on the file to be compressed to obtain the first file.
[0078] In the embodiment, when the download address of the file to be compressed in the first service system is obtained, the file to be compressed can be downloaded from the corresponding position in the first service system according to the download address, and file compression processing is performed on the file to be compressed to obtain the first file. In this way, when the first file is pushed to the second service system, the data transmission amount is smaller and the data transmission time consumption is shorter. The specific compression mode and requirement of the file compression processing can be arranged in advance, which is not limited herein.
[0079] 404. The first file is uploaded to the first service system to obtain an upload address of the first file, and the upload address is included in the file identifier.
[0080] In the embodiment, after the file compression processing is completed, the first file obtained by compression is uploaded to the first service system to be pushed to the second service system subsequently. After the first file is uploaded to the first service system, the upload address of the first file can be obtained, and the upload address can be taken as the storage address of the first file in the first service system and recorded in the file identifier of the first file.
[0081] The file pushing method between service systems provided by the embodiment of the application provides the compression function of the file in the first file system by the first file pushing module, so as to reduce the data transmission amount and time consumption of file pushing.
[0082] In some embodiments, in order to reduce the writing cost of the first file pushing module, part of the code in the first file pushing module can be implemented in a reusable manner. For example, the downloading of the file to be compressed, the uploading of the first file, and the downloading of the first file are all based on the same preset file processing program (FileHandler) in the first file pushing module. Specifically, a plurality of virtual classes are abstracted in the first file pushing module: AbstractCompressFileHandler (abstract compressed document processing program), AbstractCompressPicHandler (abstract compressed picture processing program), AbstractPushFileHandler (abstract pushing file processing program), etc., which are used to implement the functions of downloading the file to be compressed, uploading the first file, and downloading the first file. The implementation of these virtual classes can be based on FileHandler in the BaseHandler (base processing program) virtual class commonly inherited by these virtual classes. As can be seen, by reusing FileHandler, the writing cost for implementing the functions of downloading the file to be compressed, uploading the first file, and downloading the first file can be reduced.
[0083] In some embodiments, the first file pushing module can be configured and modified by a configuration file or a configuration database table, etc. In addition to the server address for storing the first file to be pushed in the first business system described above, the running rules of the first file pushing module set in the configuration file and the running rules of the first file pushing module set in the configuration database table can all include file-related task configurations (such as the timing trigger period of these file-related tasks). When the first file pushing module is configured by both the configuration file and the configuration database table, the first file pushing module can generate a configuration conflict. In this case, the file pushing method between business systems can further include: detecting whether the configuration file and the configuration database table of the first file pushing module exist in the terminal at the same time; if the configuration file and the configuration database table exist in the terminal at the same time, executing the step of triggering the file pushing task in the first file pushing module according to the priority of the configuration file and the configuration database table. For example, if the priority of the configuration file is higher than that of the configuration database table, the step of triggering the file pushing task in the first file pushing module is executed according to the running rules of the first file pushing module set in the configuration file. For another example, if the priority of the configuration file is lower than that of the configuration database table, the step of triggering the file pushing task in the first file pushing module is executed according to the running rules of the first file pushing module set in the configuration database table. The priority of the configuration file and the configuration database table can be set in advance based on actual needs.
[0084] In addition to the above-described file pushing method between business systems, the embodiments of the present application further provide a computer device, which comprises:
[0085] one or more processors;
[0086] a memory; and
[0087] one or more application programs, wherein the one or more application programs are stored in the memory and configured to perform the steps of any of the above-described embodiments of the file pushing method between business systems by the processor.
[0088] As shown in Figure 5 , which shows a structural schematic diagram of a computer device related to the embodiments of the present application. The computer device can be a terminal or a server, and specifically comprises:
[0089] The computer device can include a processor 501 with one or more processing cores, a storage unit 502 with one or more computer readable storage media, a power supply 503, an input unit 504, and the like. Those skilled in the art can understand that the computer device structure shown in Figure 5 does not constitute a limitation on the computer device, which can include more or fewer components than those shown in the figure, or combine certain components, or different component arrangements. Among them:
[0090] The processor 501 is the control center of the computer device, which connects various parts of the computer device through various interfaces and lines, performs various functions of the computer device and processes data by running or executing software programs and / or modules stored in the storage unit 502, and calling data stored in the storage unit 502, thereby overall monitoring the computer device. Optionally, the processor 501 can include one or more processing cores; preferably, the processor 501 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 501.
[0091] The storage unit 502 can be used to store software programs and modules, and the processor 501 executes various function applications and data processing by running the software programs and modules stored in the storage unit 502. The storage unit 502 can mainly include a storage program area and a storage data area, wherein the storage program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), and the like; and the storage data area can store data created according to the use of the computer device, etc. In addition, the storage unit 502 can include a high-speed random access memory, and can also include a nonvolatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the storage unit 502 can also include a memory controller to provide the processor 501 with access to the storage unit 502.
[0092] The computer device further includes a power supply 503 for supplying power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 503 can also include one or more than one direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power state indicator, and the like.
[0093] The computer device can further include an input unit 504, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0094] Although not shown, the computer device can also include a display unit, etc., which will not be described here. Specifically in the embodiments of the present application, the processor 501 in the computer device will load the executable file corresponding to the process of one or more than one application program into the storage unit 502 according to the following instructions, and run the application program stored in the storage unit 502 by the processor 501, so as to realize various functions, as follows:
[0095] The file pushing task in the first file pushing module is triggered in a timing manner; when the file pushing task is triggered, the first file query interface is called to query the first file to be pushed to the second business system in the first business system by using the first file query interface, and the file identifier of the first file is obtained; the first file is downloaded based on the file identifier, and the first file is sent to the second remote interface to call the second remote interface and store the first file to the second business system by using the second remote interface, and the second file pushing module including the second remote interface is embedded into the second business system; when the storage success message fed back by the second remote interface is received, the first synchronization callback interface is called to modify the file state of the first file in the first business system from the first state to the second state by using the first synchronization callback interface.
[0096] The file pushing method between business systems provided by the embodiments of the present application embeds the first file pushing module into the first business system in the form of a dependent package, triggers the file pushing task in the first file pushing module in a timing manner, calls the first file query interface and the first synchronization callback interface in the first business system, and calls the second remote interface of the second file pushing module embedded into the second business system, pushes the file from the first business system to the second business system, decouples the file pushing function between different business systems from the business systems, and is independent of the business systems, and only needs to set a small number of interfaces in the business systems for calling, and thus the file pushing cost between business systems is reduced.
[0097] To this end, the computer readable storage medium provided by the embodiments of the present application can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. The computer readable storage medium stores a plurality of instructions, and the instructions can be loaded by a processor to execute the steps in any of the file pushing methods between business systems provided by the embodiments of the present application. For example, the instructions can execute the following steps:
[0098] The file pushing task in the first file pushing module is triggered in time; when the file pushing task is triggered, the first file query interface is called to query the first file to be pushed to the second business system in the first business system by using the first file query interface, and the file identifier of the first file is obtained; the first file is downloaded based on the file identifier, and the first file is sent to the second remote interface to call the second remote interface and store the first file to the second business system by using the second remote interface, and the second file pushing module of the second business system includes the second remote interface; when the storage success message fed back by the second remote interface is received, the first synchronization callback interface is called to modify the file state of the first file in the first business system from the first state to the second state by using the first synchronization callback interface.
[0099] In addition, the embodiment of the present application further provides a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium and executes the computer instructions, so that the electronic device performs the file pushing method between business systems as described in any one of the above.
[0100] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0101] The above describes in detail the file pushing method between business systems, the device and the storage medium provided by the embodiment of the present application. The principle and implementation mode of the present application are described by applying specific examples in this paper. The above embodiment is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed; in view of the above, the content of the specification should not be understood as the limitation of the present application.
Claims
1. A method for file pushing between business systems, characterized in that, The method is applied to a terminal, the terminal including a first business system and a first file push module. The first business system is provided with a first file query interface and a first synchronization callback interface. The first file push module is embedded into the first business system as a dependency package. The method includes: The file push task in the first file push module is triggered periodically. When the file push task is triggered, the first file query interface is called to query the first file to be pushed to the second business system in the first business system and obtain the file identifier of the first file. The first file is downloaded based on the file identifier, the first file is sent to the second remote interface to invoke the second remote interface, and the first file is stored in the second business system using the second remote interface. The second file push module embedded in the second business system includes the second remote interface. Upon receiving a storage success message from the second remote interface, the first synchronization callback interface is invoked to change the file status of the first file in the first business system from the first status to the second status.
2. The file push method between business systems as described in claim 1, characterized in that, The first file push module includes a first remote interface, and the method further includes: When the first remote interface is invoked, the second file received by the first remote interface is stored in the first business system using the first remote interface, and the second file originates from the second business system. Upon receiving the storage address of the second file in the first business system, a storage success message is sent to the second file push module, so that the second file push module calls the second synchronous callback interface in the second business system and uses the second synchronous callback interface to change the file status of the second file in the second business system from the first status to the second status.
3. The file push method between business systems as described in claim 1, characterized in that, The first business system is equipped with a first file compression interface, and the method further includes: The file compression task in the first file push module is triggered periodically. When the file compression task is triggered, the first file compression interface is called to query the download address of the file to be compressed in the first business system. Download the file to be compressed according to the download address, and then compress the file to obtain the first file; The first file is uploaded to the first business system to obtain the upload address of the first file, and the file identifier includes the upload address.
4. The file push method between business systems as described in claim 3, characterized in that, The download of the file to be compressed, the upload of the first file, and the download of the first file are all performed based on the same preset file processing program in the first file push module.
5. The file push method between business systems as described in claim 1, characterized in that, The step of downloading the first file based on the file identifier includes: Obtain the configuration information of the file server associated with the first business system; Determine the target file server corresponding to the file server configuration information; The first file is downloaded from the target file server based on the file identifier.
6. The file push method between business systems as described in claim 1, characterized in that, The step of calling the first file query interface to query the first file in the first business system to be pushed to the second business system includes: Call the first file query interface to obtain the file query method set in the first business system; Using the first file query interface, query the first file in the first business system that is to be pushed to the second business system according to the file query method.
7. The file push method between business systems as described in claim 1, characterized in that, The method further includes: Detect whether the configuration file and configuration database table of the first file push module exist simultaneously in the terminal; If both the configuration file and the configuration database table exist in the terminal, the step of periodically triggering the file push task in the first file push module is executed according to the priority of the configuration file and the configuration database table.
8. The file push method between business systems as described in any one of claims 1 to 7, characterized in that, The dependency package used when the first file push module is embedded into the first business system is the same as the dependency package used when the second file push module is embedded into the second business system.
9. A computer device, characterized in that, The computer device includes: One or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps of the file push method between business systems according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to execute the steps of the file push method between business systems as described in any one of claims 1 to 8.
Citation Information
Patent Citations
File management method, device and system and storage medium
CN113656357A
Business data processing method and device, storage medium and electronic equipment
CN114358923A