Disclosure of Invention
In view of this, embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for processing service data, which can solve the problems of service data loss and system upgrade failure caused by complex operation of an upgrade process by processing service data through a temporary node in a system upgrade process.
To achieve the above object, according to one aspect of the embodiments of the present application, there is provided a method for processing service data.
The method for processing the service data comprises the following steps: receiving a service processing request sent by a user side, and acquiring a source tag of service data corresponding to the service processing request;
responding to the source tag as a first system, and acquiring the archiving state of the service data;
responding to the archiving state as a first state, inquiring a first module associated with the service processing request in the first system to call the first module to process the service processing request, and obtaining a processing result; responding to the archiving state as a second state, inquiring a second module associated with the service processing request in the second system to call the second module to process the service processing request, and obtaining a processing result;
and generating a result display page based on the processing result, and sending the result display page to the user side.
In one embodiment, the method further comprises:
responding to an archiving instruction, inquiring a module to be upgraded in the first system to obtain business data to be archived associated with the module to be upgraded;
and migrating the business data to be archived to the second system, determining the source tag of the data to be archived as the first system, and determining the archiving state of the data to be archived as the first state.
In yet another embodiment, after migrating the business data to be archived to the second system, the method further comprises:
inquiring the upgrading state of a module to be upgraded in the first system;
and responding to the upgrading state being completed, acquiring service data corresponding to the to-be-upgraded module, and updating the archiving state of the service data corresponding to the to-be-upgraded module into the second state.
In yet another embodiment, querying a module to be upgraded in the first system includes:
acquiring data types in the archiving instruction, wherein the data types comprise flow ledger data and circulation opinion records;
querying an archive model associated with the data type to call the archive model, and querying a module to be upgraded in the first system.
In yet another embodiment, invoking the second module to process the service processing request includes:
responding to a calling instruction of a third party system, and calling an interface corresponding to the third party system in the first system;
responsive to the first system receiving the response information of the third party system, the response information is transparently passed to the second system.
In yet another embodiment, obtaining the source tag of the service data corresponding to the service processing request includes:
inquiring login information corresponding to the user side to verify the authority of the user side based on the login information;
and responding to the result of the permission verification to obtain the source tag of the service data corresponding to the service processing request.
In yet another embodiment, generating a results display page based on the processing results includes:
and acquiring the version identifier of the user side to inquire a display template corresponding to the version identifier, and generating a result display page based on the display template and the processing result.
To achieve the above object, according to another aspect of an embodiment of the present application, there is provided an apparatus for processing service data.
The device for processing the service data comprises the following components: the receiving unit is used for receiving a service processing request sent by a user terminal and obtaining a source tag of service data corresponding to the service processing request;
the acquiring unit is used for responding to the source tag as a first system and acquiring the archiving state of the service data;
the processing unit is used for responding to the archiving state as a first state, inquiring a first module associated with the service processing request in the first system so as to call the first module to process the service processing request and obtain a processing result; responding to the archiving state as a second state, inquiring a second module associated with the service processing request in the second system to call the second module to process the service processing request, and obtaining a processing result;
and the generating unit is used for generating a result display page based on the processing result and sending the result display page to the user side.
In one embodiment, the obtaining unit is further configured to query a module to be upgraded in the first system in response to an archiving instruction, so as to obtain service data to be archived associated with the module to be upgraded;
the apparatus further comprises:
and the determining unit is used for migrating the business data to be archived to the second system, determining the source tag of the data to be archived as the first system, and determining the archiving state of the data to be archived as the first state.
In yet another embodiment, the apparatus further comprises:
the inquiring unit is used for inquiring the upgrading state of the module to be upgraded in the first system;
and the updating unit is used for acquiring the service data corresponding to the to-be-updated module in response to the updating state being completed so as to update the archiving state of the service data corresponding to the to-be-updated module into the second state.
In yet another embodiment, the query unit is specifically configured to:
acquiring data types in the archiving instruction, wherein the data types comprise ledger data and circulation opinion records;
querying an archive model associated with the data type to call the archive model, and querying a module to be upgraded in the first system.
In a further embodiment, the processing unit is specifically configured to:
responding to a calling instruction of a third party system, and calling an interface corresponding to the third party system in the first system;
responsive to the first system receiving the response information of the third party system, the response information is transparently passed to the second system.
In a further embodiment, the receiving unit is specifically configured to:
inquiring login information corresponding to the user side to verify the authority of the user side based on the login information;
and responding to the result of the permission verification to obtain the source tag of the service data corresponding to the service processing request.
In a further embodiment, the generating unit is specifically configured to:
and acquiring the version identifier of the user side to inquire a display template corresponding to the version identifier, and generating a result display page based on the display template and the processing result.
To achieve the above object, according to still another aspect of an embodiment of the present application, there is provided an electronic apparatus.
An electronic device according to an embodiment of the present application includes: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the method for processing the service data provided by the embodiment of the application.
To achieve the above object, according to still another aspect of an embodiment of the present application, a computer-readable medium is provided.
A computer readable medium of an embodiment of the present application stores a computer program thereon, which when executed by a processor implements a method for processing service data provided by the embodiment of the present application.
To achieve the above object, according to still another aspect of an embodiment of the present application, there is provided a computer program product.
A computer program product of an embodiment of the present application includes a computer program that, when executed by a processor, implements a method for processing service data provided by the embodiment of the present application.
One embodiment of the above application has the following advantages or benefits: in the embodiment of the application, a first system and a second system coexist in a system upgrading stage, data in the first system can be archived in the second system along with system upgrading, and a source tag and an archiving state can be set for archived service data; when a service processing request is received, whether the service data is the service data archived by the first system or not can be determined based on the service data source, and if so, whether the archiving of the service data is completed or not needs to be judged again; when the archiving is determined to be in the second state, the business is indicated to be updated, and business processing can be executed by the second system, namely, business processing request processing is directly carried out through a processing module in the second system; when the archiving state is determined to be the first state, it is indicated that the service processing function has not completed the upgrade, so the service processing may need to be performed by the first system, i.e. the processing of the service processing request is performed directly by the processing module in the first system. In this way, in the embodiment of the application, the new system and the old system coexist in the system upgrade, and the service processing can determine which system to use for service processing based on different states of the system upgrade, so that a temporary node is not required to be set, the consistency and the safety of service data in the upgrade process can be ensured, the upgrade process is easy to operate, and the high reliability and the high availability of the system are ensured.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Detailed Description
Exemplary embodiments of the present application will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present application are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It is noted that embodiments of the application and features of the embodiments may be combined with each other without conflict. The technical scheme of the application obtains, stores, uses, processes and the like the data, which all meet the relevant regulations of national laws and regulations.
The embodiment of the application provides a service data processing system which can be used for a scene of processing service data in a system upgrading process, in particular to a scene of processing service data in a system upgrading process under the condition of no downtime.
In the embodiment of the application, the service data processing system can be upgraded under the condition of no downtime. Specifically, the system upgrading mode is to gradually migrate each module for service processing in the first system to the second system, and process the service request of the user side. Wherein the first system represents a service system before upgrading and the second system represents a service system after upgrading. In the initialization stage of system upgrade, the service data in the first system is usually transferred to the second system in the initialization stage, and then in the upgrade process, the service request is still normally processed, so that the processing module which is not migrated in the first system needs to continue to process the service and generate the service data, and the service data generated in the process needs to be archived in the second system. If data interaction with other related contacts is required during the business process, the interaction with the associated system may be performed by the first system.
Specifically, taking the service processing system as a CRM system (sales management) as an example, service data in the CRM system may include flow ledger data and circulation opinion, and these two types of data may be processed respectively in data archiving to ensure the completeness of the data. Thus upgrades at the CRM system may involve an upgrade process comprising: the process ledger data archiving, flow opinion records archiving, database storage, processing module migration, associated system interaction and user side interaction, and as shown in fig. 1, is a schematic diagram of an architecture of a CRM system for processing content in an upgrade process.
An embodiment of the present application provides a method for processing service data, which may be performed by a service data processing system, as shown in fig. 2, and includes:
s201: and receiving a service processing request sent by a user terminal, and acquiring a source tag of service data corresponding to the service processing request.
In this case, during the system upgrade, the ue cannot generally sense whether the system is being upgraded, so normal service processing can be performed, and the ue can normally send a service processing request to the service data processing system. In the upgrading process of the service processing system, for some processing modules which are not migrated to the second system in the first system, in order to ensure the normal operation of service processing, the general production can be continuously processed by the first system. Therefore, after the service data processing system receives the service processing request sent by the user terminal, the source tag of the service data corresponding to the service processing request can be acquired first.
In the embodiment of the application, when the business data is archived to the second system in the first system, the source of the business data can be marked by the preset source label, and the source label indicates which system the business data is generated by. The source label of the service data is a second system, which indicates that the service data is generated by the second system, namely, the service data is generated by the updated system, namely, the module corresponding to the service processing does not belong to the module which is migrated to the second system by the first system, so that the service processing request can be directly processed by the second system; the source tag of the service data is the first system, which indicates that the service data is generated by the first system, that is, the system before upgrading, that is, the module corresponding to the service processing belongs to the module migrated from the first system to the second system, so that further judgment needs to be made on whether the module has been migrated to be completed at this time, so as to determine which system processes the service processing request.
S202: and responding to the source tag as the first system, and acquiring the archiving state of the service data.
The source tag is the first system, and further judgment needs to be made as to whether the module has been migrated, so that the archiving state of the service data can be obtained in this step.
In the embodiment of the application, since the service data is still generated by the first system in the upgrading process, for each service processing module, the corresponding service processing is usually executed by the second system only after the module is migrated, so that the service data is archived by the first system to the second system in the processing module which is not migrated, and the archiving state can be set. The archiving state may include a first state and a second state, where the first state indicates that the corresponding processing module has not completed migration, and that the first system is required to perform service processing; the second state indicates that the corresponding processing module has completed the migration, and that the second system is required to perform service processing.
S203: responding to the archiving state as a first state, inquiring a first module associated with the service processing request in the first system to call the first module to process the service processing request, and obtaining a processing result; and responding to the archiving state as a second state, inquiring a second module associated with the service processing request in the second system to call the second module to process the service processing request, and obtaining a processing result.
After acquiring the archiving state of the service data, the processing mode of the service processing request can be determined, so that when the archiving state is determined to be the first state in the step, a first module associated with the service processing request in the first system can be queried to call the first module to process the service processing request; when the archiving state is determined to be the second state, a second module associated with the business process request in the second system may be queried to invoke the second module to process the business process request.
In the embodiment of the present application, the interfaces for calling and data transmission between the first system and the second system may be preconfigured, so that after determining the processing mode of the service processing request, the first module and the second module may be called by the corresponding interfaces.
In a real-time manner of the embodiment of the present application, because during the service data processing process, a scenario where data interaction with other systems is required is often encountered, such as interaction with a third party system associated with the service data processing system is required. In the process of upgrading the business data processing system, if the second system encounters a scene of interaction with the third party system during business processing, the second system can interact with the third party system through the first system and the third party system in the way of data interaction, and after the first system obtains the response information of the third party system, the response information can be transmitted to the second system in a transparent transmission way so as to record the business processing. The specific implementation steps can be as follows: responding to a calling instruction of a third party system, and calling an interface corresponding to the third party system in the first system; responsive to the first system receiving the response information of the third party system, the response information is transparently passed to the second system.
S204: and generating a result display page based on the processing result, and sending the result display page to the user side.
After the processing result is obtained through the service processing, a corresponding result page can be generated and returned to the user side, so that the user side can check the processing result conveniently.
Specifically, in the embodiment of the application, corresponding display templates can be configured for the clients with different versions, and then the version identification of the client can be obtained first in the step, so as to inquire the display templates corresponding to the version identification, and further a result display page is generated based on the display templates and the processing result.
It should be noted that, in the embodiment of the present application, after receiving the service processing request sent by the user side, the authority of the user side may be checked based on the login information corresponding to the user side, and after the verification is passed, the step of obtaining the source tag of the service data corresponding to the service processing request in step S201 is executed.
In the embodiment of the application, a new system and an old system coexist in the system upgrading, and the service processing can determine which system is used for service processing based on different states of the system upgrading, so that a temporary node is not required to be arranged, the consistency and the safety of service data in the upgrading process are ensured, the upgrading process is easy to operate, and the high reliability and the high availability of the system are ensured.
The following describes the flow of service data archiving in the method for service data processing according to the embodiment of the present application with reference to the embodiment shown in fig. 2, and as shown in fig. 3, the method includes:
s301: and responding to the archiving instruction, inquiring the module to be upgraded in the first system to acquire the business data to be archived associated with the module to be upgraded.
The archiving instruction may be periodically and automatically triggered, so that the service data may be periodically archived. When the service data is generated by the first system during the system upgrading process, the processing module which is usually completed for migration in the first system processes the service and generates the service data, so that when the archiving instruction is responded in the step, the module to be upgraded in the first system, namely the processing module which is not completed by upgrading, is firstly queried, and further the service data to be archived, which are associated with the module to be upgraded, can be obtained.
It should be noted that when the service data is a CRM system, the data types of the service data may include flow ledger data and flow opinion records, and in the embodiment of the present application, corresponding archiving models may be set for the two data types respectively, so as to facilitate archiving processing of the two types of data. Therefore, the archiving instruction in this step may include a data type, so after the data type is acquired, the archiving model associated with the data type may be queried, so as to call the archiving model, query the module to be upgraded in the first system, and perform service data processing.
S302: and migrating the service data to be archived to a second system, determining a source tag of the data to be archived as a first system, and determining an archiving state of the data to be archived as a first state.
The data to be archived is migrated to the second system for storage, and a corresponding source tag and an archiving state can be set for the data to be archived, so that subsequent business processing is facilitated.
The source tag is the first system, and the archiving state is the first state, because the business data to be archived is migrated by the first system and the corresponding processing module is completed.
It should be noted that, in the embodiment of the present application, the upgrade status of the module to be upgraded in the first system may also be queried for each module to be upgraded; and responding to the upgrade state being completed, acquiring service data corresponding to the to-be-upgraded module, and updating the archiving state of the service data corresponding to the to-be-upgraded module into a second state. And updating the archiving state of the corresponding service data in time after the module to be upgraded is upgraded.
In the embodiment of the application, the business data in the first system is archived, so that the compatibility of the first system and the second system is ensured, and the process ledger data and the circulation opinion record are normally used and displayed in the second system, so that the functions of the two systems are organically integrated, and the normal use of a user is not influenced.
In order to solve the problems existing in the prior art, an embodiment of the present application provides a device 400 for processing service data, as shown in fig. 4, the device 400 includes:
a receiving unit 401, configured to receive a service processing request sent by a user side, and obtain a source tag of service data corresponding to the service processing request;
an obtaining unit 402, configured to obtain an archiving state of the service data in response to the source tag being the first system;
a processing unit 403, configured to query a first module associated with the service processing request in the first system in response to the archiving state being the first state, so as to invoke the first module to process the service processing request, and obtain a processing result; responding to the archiving state as a second state, inquiring a second module associated with the service processing request in the second system to call the second module to process the service processing request, and obtaining a processing result;
and the generating unit 404 is configured to generate a result display page based on the processing result, and send the result display page to the user side.
It should be understood that the manner of implementing the embodiment of the present application is the same as that of implementing the embodiment shown in fig. 2, and will not be described herein.
In one embodiment, the obtaining unit 402 is further configured to query a module to be upgraded in the first system in response to an archiving instruction, so as to obtain service data to be archived associated with the module to be upgraded;
the apparatus 400 further comprises:
and the determining unit is used for migrating the business data to be archived to the second system, determining the source tag of the data to be archived as the first system, and determining the archiving state of the data to be archived as the first state.
In yet another embodiment, the apparatus 400 further comprises:
the inquiring unit is used for inquiring the upgrading state of the module to be upgraded in the first system;
and the updating unit is used for acquiring the service data corresponding to the to-be-updated module in response to the updating state being completed so as to update the archiving state of the service data corresponding to the to-be-updated module into the second state.
In yet another embodiment, the query unit is specifically configured to:
acquiring data types in the archiving instruction, wherein the data types comprise ledger data and circulation opinion records;
querying an archive model associated with the data type to call the archive model, and querying a module to be upgraded in the first system.
In yet another embodiment, the processing unit 403 is specifically configured to:
responding to a calling instruction of a third party system, and calling an interface corresponding to the third party system in the first system;
responsive to the first system receiving the response information of the third party system, the response information is transparently passed to the second system.
In yet another embodiment, the receiving unit 401 is specifically configured to:
inquiring login information corresponding to the user side to verify the authority of the user side based on the login information;
and responding to the result of the permission verification to obtain the source tag of the service data corresponding to the service processing request.
In yet another embodiment, the generating unit 404 is specifically configured to:
and acquiring the version identifier of the user side to inquire a display template corresponding to the version identifier, and generating a result display page based on the display template and the processing result.
It should be understood that the manner of implementing the embodiments of the present application is the same as that of implementing the embodiments shown in fig. 2 and 3, and will not be described herein.
In the embodiment of the application, a new system and an old system coexist in the system upgrading, and the service processing can determine which system is used for service processing based on different states of the system upgrading, so that a temporary node is not required to be arranged, the consistency and the safety of service data in the upgrading process are ensured, the upgrading process is easy to operate, and the high reliability and the high availability of the system are ensured.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
The electronic equipment of the embodiment of the application comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor, so that the at least one processor performs the method for processing service data provided by the embodiment of the present application.
Fig. 5 illustrates an exemplary system architecture 500 of a business data processing method or apparatus to which embodiments of the present application may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 is used as a medium to provide communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 505 via the network 504 using the terminal devices 501, 502, 503 to receive or send messages or the like. Various client applications may be installed on the terminal devices 501, 502, 503.
The terminal devices 501, 502, 503 may be, but are not limited to, smartphones, tablets, laptop and desktop computers, and the like.
The server 505 may be a server providing various services, and may perform processing such as analysis on received data such as a product information query request, and feed back processing results (e.g., product information—merely by way of example) to the terminal device.
It should be noted that, the method for processing service data provided in the embodiment of the present application is generally executed by the server 505, and accordingly, the device for processing service data is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, there is illustrated a schematic diagram of a computer system 600 suitable for use in implementing embodiments of the present application. The computer system shown in fig. 6 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the present application are performed when the computer program is executed by a Central Processing Unit (CPU) 601.
The computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented in software or in hardware. The described units may also be provided in a processor, for example, described as: a processor includes a receiving unit, an acquiring unit, a processing unit, and a generating unit. The names of these units do not in any way constitute a limitation of the unit itself, for example, the receiving unit may also be described as "unit requesting the receiving function".
As another aspect, the present application also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the method of business data processing provided by the present application.
As another aspect, the present application also provides a computer program product, including a computer program, where the program when executed by a processor implements a method for processing service data provided by an embodiment of the present application.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.