[go: up one dir, main page]

CN115268851A - Service processing method and device, electronic equipment and storage medium - Google Patents

Service processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115268851A
CN115268851A CN202210919048.7A CN202210919048A CN115268851A CN 115268851 A CN115268851 A CN 115268851A CN 202210919048 A CN202210919048 A CN 202210919048A CN 115268851 A CN115268851 A CN 115268851A
Authority
CN
China
Prior art keywords
service
format
feedback result
target format
service data
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
CN202210919048.7A
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.)
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
ICBC 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 Industrial and Commercial Bank of China Ltd ICBC, ICBC Technology Co Ltd filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210919048.7A priority Critical patent/CN115268851A/en
Publication of CN115268851A publication Critical patent/CN115268851A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present disclosure provides a service processing method, an apparatus, an electronic device, a computer-readable storage medium, and a program product, which may be used in the field of financial technology or computer technology. The service processing method comprises the following steps: acquiring a service request from terminal equipment in an annotation mode, wherein the service request comprises service data; performing format conversion on the service data to obtain service data in a first target format, wherein the first target format is a format matched with the server; sending the service data in the first target format to a server; performing format conversion on the service feedback result in response to receiving the service feedback result aiming at the service data from the server to generate a service feedback result in a second target format, wherein the second target format is a format matched with the terminal equipment; and sending the service feedback result in the second target format to the terminal equipment.

Description

Service processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of financial technology or computer technology, and more particularly, to a method and an apparatus for processing a service, an electronic device, a computer-readable storage medium, and a program product.
Background
In the process of project development, problems of project duration shortage, heavy task, limited resources and module repeated development are often encountered, for example, in the business processing development, each project has a special number of network request server interfaces for processing various business data, which brings challenges to the project development work.
In implementing the disclosed concept, the inventors found that there are at least the following problems in the related art: the network access mode in the prior art is long in time consumption and complex in procedure.
Disclosure of Invention
In view of the above, the present disclosure provides a service processing method, device, electronic device, computer-readable storage medium, and program product.
One aspect of the present disclosure provides a service processing method, including:
acquiring a service request from terminal equipment in an annotation mode, wherein the service request comprises service data;
performing format conversion on the service data to obtain service data in a first target format, wherein the first target format is a format matched with a server;
sending the service data in the first target format to the server;
responding to a service feedback result aiming at the service data received from the server, carrying out format conversion on the service feedback result, and generating a service feedback result in a second target format, wherein the second target format is a format matched with the terminal equipment; and
and sending the service feedback result of the second target format to the terminal equipment.
According to an embodiment of the present disclosure, the performing format conversion on the service data to obtain service data in a first target format includes:
determining the format of the service data;
under the condition that the format of the service data is determined to be inconsistent with the first target format, carrying out serialization processing on the service data to obtain initial service data in the first target format; and
and encrypting the initial service data in the first target format to generate the service data in the first target format.
According to an embodiment of the present disclosure, the performing format conversion on the service feedback result in response to receiving the service feedback result from the server for the service data to generate the service feedback result in the second target format includes:
in response to receiving the service feedback result from the server for the service data, decrypting the service feedback result to obtain a decrypted service feedback result;
determining the format of the decrypted service feedback result; and
and under the condition that the format of the decrypted service feedback result is inconsistent with the second target format, performing deserialization processing on the service feedback result to generate a service feedback result in the second target format.
According to an embodiment of the present disclosure, the sending the service feedback result in the second target format to the terminal device includes:
and sending the service feedback result in the second target format to a main thread of the terminal equipment so as to display the service feedback result in the second target format on the terminal equipment by using the main thread.
According to an embodiment of the present disclosure, the service processing method further includes, before performing format conversion on the service feedback result and generating a service feedback result in a second target format:
responding to a service feedback result aiming at the service data received from the server, and analyzing the service feedback result by using a program code processor to obtain preset field data;
determining whether the service feedback result represents network abnormity or not based on the data of the predetermined field; and
and under the condition that the service feedback result represents network abnormality, determining a fault reason based on the preset field data, and taking the fault reason as the service feedback result.
According to the embodiment of the present disclosure, the service processing method further includes:
generating a service log based on the service request; and
and storing the service log into a cache.
One aspect of the present disclosure provides a service processing apparatus, including:
the acquisition module is used for acquiring a service request from the terminal equipment in an annotation mode, wherein the service request comprises service data;
the first format conversion module is used for carrying out format conversion on the service data to obtain service data in a first target format, wherein the first target format is a format matched with the server;
a first sending module, configured to send the service data in the first target format to the server;
a second format conversion module, configured to perform format conversion on a service feedback result in response to receiving a service feedback result from the server for the service data, and generate a service feedback result in a second target format, where the second target format is a format matched with the terminal device; and
and the second sending module is used for sending the service feedback result in the second target format to the terminal equipment.
Another aspect of the present disclosure provides an electronic device including: one or more processors; a memory for storing one or more instructions, wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause the processor to implement the method as described above.
Another aspect of the disclosure provides a computer program product comprising computer executable instructions for implementing the method as described above when executed.
According to the embodiment of the disclosure, the service request from the terminal equipment is obtained in an annotation mode, and the service request comprises service data; carrying out format conversion on the service data to obtain service data in a first target format, wherein the first target format is a format matched with the server; sending the service data in the first target format to a server; performing format conversion on the service feedback result in response to receiving the service feedback result aiming at the service data from the server to generate a service feedback result in a second target format, wherein the second target format is a format matched with the terminal equipment; and the technical means of sending the service feedback result in the second target format to the terminal equipment is used for carrying out format conversion on the service data from the terminal equipment so as to achieve the adaptation effect of matching the service data from the terminal equipment with the data format required by the server, and also carrying out format conversion on the service feedback result from the server so as to achieve the adaptation effect of matching the service result from the server with the data format required by the terminal equipment. Therefore, the service processing method disclosed by the invention can be utilized to realize the loose coupling effect between the terminal equipment and the server, improve the service processing efficiency and enhance the service management capability.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically shows an exemplary system architecture to which a traffic processing method may be applied according to an embodiment of the present disclosure;
FIG. 2 schematically shows a flow diagram of a traffic handling method according to an embodiment of the present disclosure;
fig. 3 schematically shows a sequence diagram of a traffic processing method according to an embodiment of the present disclosure;
fig. 4 schematically shows a flow chart of determining a business feedback result according to another embodiment of the present disclosure;
fig. 5 schematically shows a block diagram of a traffic processing device according to an embodiment of the present disclosure; and
fig. 6 schematically shows a block diagram of a computer system 600 adapted to implement a business process method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs, unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B, and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B, and C" would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.). In those instances where a convention analogous to "at least one of A, B, or C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B, or C" would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.).
The embodiment of the disclosure provides a service processing method. The method comprises the steps of obtaining a service request from terminal equipment in an annotation mode, wherein the service request comprises service data; performing format conversion on the service data to obtain service data in a first target format, wherein the first target format is a format matched with the server; sending the service data in the first target format to a server; performing format conversion on a service feedback result in response to receiving a service feedback result aiming at service data from a server to generate a service feedback result in a second target format, wherein the second target format is a format matched with the terminal equipment; and sending the service feedback result in the second target format to the terminal equipment.
According to the embodiment of the disclosure, by using the service processing method of the disclosure, format conversion can be performed on the service data from the terminal device to achieve an adaptation effect of matching the service data from the terminal device with a data format required by the server, and format conversion can also be performed on the service feedback result from the server to achieve an adaptation effect of matching the service result from the server with the data format required by the terminal device. Therefore, the service processing method disclosed by the invention can be utilized to realize the loose coupling effect between the terminal equipment and the server, improve the service processing efficiency and enhance the service management capability.
It should be noted that the service processing method and apparatus disclosed by the present disclosure may be used in a web access scenario in the financial field, and may also be used in a web access scenario in any field other than the financial field.
Fig. 1 schematically shows an exemplary system architecture 100 to which a traffic processing method may be applied according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and an intermediate server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the intermediate server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
The user may use the terminal devices 101, 102, 103 to interact with the intermediate server 105 over the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, and/or social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The intermediate server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The backend management server may analyze and process the received data such as the user request, and feed back a processing result (for example, a web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the service processing method provided by the embodiment of the present disclosure may be generally executed by the intermediate server 105. Accordingly, the service processing apparatus provided by the embodiment of the present disclosure may be generally disposed in the intermediate server 105. The service processing method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the intermediate server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the intermediate server 105. Correspondingly, the service processing apparatus provided in the embodiment of the present disclosure may also be disposed in a server or a server cluster that is different from the intermediate server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the intermediate server 105.
For example, the intermediate server 105 receives service requests from the terminal devices 101, 102, and 103, and obtains the service requests from the terminal devices 101, 102, and 103 in an annotation manner, where the service requests include service data; performing format conversion on the service data to obtain service data in a first target format, wherein the first target format is a format matched with the server; sending the service data in the first target format to a server; performing format conversion on the service feedback result in response to receiving the service feedback result aiming at the service data from the server to generate a service feedback result in a second target format, wherein the second target format is a format matched with the terminal; and sending the service feedback result of the second target format to the terminal.
It should be understood that the number of terminal devices, networks and intermediate servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and intermediate servers, as desired for an implementation.
Fig. 2 schematically shows a flow chart of a traffic processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S201 to S205.
In operation S201, a service request from a terminal device is obtained through an annotation manner, where the service request includes service data.
In operation S202, format conversion is performed on the service data to obtain service data in a first target format, where the first target format is a format matched with the server.
In operation S203, the service data in the first target format is transmitted to the server.
In operation S204, in response to receiving a service feedback result for the service data from the server, format conversion is performed on the service feedback result to generate a service feedback result in a second target format, where the second target format is a format matched with the terminal device.
In operation S205, the service feedback result in the second target format is sent to the terminal device.
According to embodiments of the present disclosure, the service request may include one or more of a query request, a transfer request, a payment request, and the like, for a network request. For example, the service request may be a "request for obtaining news information".
According to the embodiment of the disclosure, the service processing method can be applied to the intermediate server, and the intermediate server can obtain the service request from the terminal equipment in an annotation mode so as to play a role in service management of the intermediate service layer. The annotation means may refer to: API annotation mode provided by Hongmong version Retrofit network framework. For example, when the terminal device makes a service request through a click event, an API interface instance object is created by a generation (create) method in a network request processing class (HmRetrofitFactory) provided externally by a network framework and used for calling encapsulation, so as to obtain the service request. But is not limited thereto. Any method may be used as long as the intermediate server is used to acquire the service request sent by the terminal device to the server.
According to the embodiment of the disclosure, format conversion is performed on the service data to obtain the service data in the first target format. The first target format is a format that matches the server. The intermediate server may be preset with a mapping relationship between a format matching the server and a format matching the terminal device, and format conversion may be performed based on the mapping relationship. So that the service data in the first target format transmitted to the server can be processed by the server.
According to the embodiment of the disclosure, the format of the service feedback result for the service data from the server may also be converted based on the mapping relationship, so that the generated service feedback result in the second target format can be processed by the terminal device.
According to the embodiment of the present disclosure, the service feedback result may be web content presentation data after the service request, for example, news information data matching the "request for obtaining news information". The terminal device may render the received service feedback result in the second target format on a page, and display the page on the interface.
According to the embodiment of the disclosure, the intermediate server is used for executing the service processing method, so that format conversion can be performed on the service data from the terminal equipment to achieve an adaptation effect of matching the service data from the terminal equipment with a data format required by the server, and format conversion can be performed on the service feedback result from the server to achieve an adaptation effect of matching the service result from the server with the data format required by the terminal equipment. Therefore, the service processing method disclosed by the invention can be utilized to realize the loose coupling effect between the terminal equipment and the server and the external high encapsulation effect of the frame, thereby enhancing the service management capability while improving the service processing efficiency.
The method shown in fig. 2 is further described with reference to fig. 3-4 in conjunction with specific embodiments.
Fig. 3 schematically shows a sequence diagram of a traffic processing method according to an embodiment of the present disclosure.
As shown in fig. 3, the method includes operations S310 to S370.
In operation S310, the intermediate server may receive a service request from the terminal device by way of annotation.
In operation S320, the format of the service data is determined, and if it is determined that the format of the service data is inconsistent with the first target format, format conversion is performed on the service data to obtain the service data in the first target format.
In operation S330, the service data in the first target format is transmitted to the server.
In operation S340, the server performs processing based on the service data in the first target format to obtain a service feedback result for the service data.
In operation S350, the intermediate server determines a format of a service feedback result in response to receiving the service feedback result for the service data from the server.
In operation S360, under the condition that the format of the service feedback result is inconsistent with the second target format, format conversion is performed on the service feedback result to generate a service feedback result in the second target format.
In operation S370, the intermediate server transmits the service feedback result in the second target format to the terminal device.
According to an embodiment of the present disclosure, in a case where it is determined that the format of the service data is consistent with the first target format, the intermediate server may directly transmit the service data to the server.
According to the embodiment of the disclosure, the intermediate server directly sends the service feedback result to the server under the condition that the format of the service feedback result is consistent with the second target format.
According to other embodiments of the present disclosure, a server for processing service data may include an OkHttp module, and an intermediate server may intercept a service request from a terminal device, which is sent to the bottom OkHttp module, implement a chain of responsibility pattern internally, and encapsulate each phase of the service request into each chain, thereby implementing decoupling of each layer.
According to the embodiment of the disclosure, by using the service processing method of the disclosure, research personnel can rapidly have the capability of the network request server interface through the intermediate server only by simply configuring and using according to the integrated description document. Therefore, each part is subjected to layered decoupling and high packaging, the occurrence rate of code bugs is low, development, maintenance and management are facilitated, the quality and the progress of the whole project are guaranteed, research and development personnel are enabled to concentrate on the realization of services and products of non-code function logic, the working efficiency of a team is improved, the development period of application of a Hongmon system is shortened, and the project cost is saved.
According to an optional embodiment of the present disclosure, for operation S202 shown in fig. 2, performing format conversion on the service data to obtain service data in a first target format, may further include: determining the format of the service data; under the condition that the format of the service data is determined to be inconsistent with the first target format, performing serialization processing on the service data to obtain the service data in the initial first target format; and encrypting the initial service data in the first target format to generate the service data in the first target format.
According to an embodiment of the present disclosure, performing serialization processing on service data to obtain service data in an initial first target format may refer to: the generic T-type service data, for example, is converted into service data in a first target format using a request converter.
According to the embodiment of the disclosure, the format of the service data can be converted by using serialization processing to obtain the service data in the initial first target format, and the service data in the initial first target format can be encrypted to generate the service data in the first target format. Therefore, the data security of the service data in the transmission process is improved.
According to an embodiment of the present disclosure, for operation S204 shown in fig. 2, in response to receiving a service feedback result for service data from a server, performing format conversion on the service feedback result to generate a service feedback result in a second target format, the method may further include: in response to receiving a service feedback result aiming at the service data from the server, decrypting the service feedback result to obtain a decrypted service feedback result; determining the format of the decrypted service feedback result; and under the condition that the format of the decrypted service feedback result is inconsistent with the second target format, performing deserialization processing on the service feedback result to generate a service feedback result in the second target format.
According to the embodiment of the present disclosure, deserializing the decrypted service feedback result, and generating the service feedback result in the second target format may refer to: the intermediate server may perform deserialization in a specific format on the service feedback result in the JSON format returned by the server by using the result converter, and generate a service feedback result in a second target format.
According to the embodiment of the disclosure, the format of the service feedback result can be converted by using the deserialization processing to obtain the service feedback result in the second target format, and the service feedback result can be decrypted to generate the decrypted service feedback result. The decryption may be an operation performed on the service feedback result encrypted by the server. Therefore, the data security in the transmission process is improved, meanwhile, the service processing requirement on the terminal equipment is reduced, and the processing efficiency is improved.
According to an embodiment of the present disclosure, for operation S205 shown in fig. 2, sending the service feedback result in the second target format to the terminal device, may further include: and sending the service feedback result in the second target format to the main thread of the terminal equipment so as to display the service feedback result in the second target format on the terminal equipment by using the main thread.
According to an embodiment of the present disclosure, a main thread (Scheduler) Scheduler (EventHandler) may be provided in the intermediate server, and an asynchronous task, for example, a service feedback result in a second target format, may be sent to the main thread process using the Scheduler, thereby implementing thread switching. And displaying the service feedback result in the second target format on the terminal equipment by using the main thread.
According to the embodiment of the disclosure, the thread switching is realized by using the scheduler to send the asynchronous task, such as the service feedback result of the second target format, to the main thread processing. The method can improve the service access processing efficiency and avoid the problem of program bloat caused by multi-thread operation, thereby realizing elegant processing rendering operation of the terminal equipment.
According to an embodiment of the present disclosure, before performing format conversion on the service feedback result and generating a service feedback result in a second target format in operation S204 shown in fig. 2, the service processing method may further include: responding to a service feedback result aiming at the service data from the server, and analyzing the service feedback result by using a program code processor to obtain preset field data; determining whether a service feedback result represents network abnormity or not based on the data of the preset field; and under the condition that the service feedback result represents the network abnormality, determining a fault reason based on the preset field data, and taking the fault reason as the service feedback result.
Fig. 4 schematically shows a flow chart for determining a traffic feedback result according to another embodiment of the present disclosure.
As shown in fig. 4, the method includes operations S410 to S440.
In operation S410, in response to receiving a service feedback result for the service data from the server, the service feedback result is parsed by the program code processor to obtain predetermined field data.
In operation S420, it is determined whether the service feedback result represents a network anomaly based on the predetermined field data. And in case that the service feedback result represents a network anomaly, performing operation S430. And in case that the service feedback result indicates that the network is normal, performing operation S440.
In operation S430, a failure cause is determined based on the predetermined field data, and the failure cause is used as a service feedback result.
In operation S440, the service feedback result is determined so that the service feedback result is decrypted and format-converted.
According to the embodiment of the disclosure, an interface for program code analysis can be defined in the intermediate server, and when a damming edition instance is created, a global program code processor is introduced to analyze a service feedback result to obtain the data of the predetermined field. And determining whether the service feedback result represents network abnormity or not based on the preset field data, and determining a fault reason based on the preset field data under the condition that the service feedback result represents network abnormity, wherein the fault reason is used as the service feedback result.
According to an embodiment of the present disclosure, the predetermined field data may be data of a preset field position. A fault mapping relationship between the fault cause and the field data may be established, and the fault cause may be determined based on the predetermined field data and the fault mapping relationship.
According to other embodiments of the present disclosure, it may be determined whether the service feedback result represents a network anomaly based on only predetermined field data, and in a case that the service feedback result represents a network anomaly, data for representing the network anomaly may be used as the service feedback result.
According to the embodiment of the disclosure, compared with the case that the data for representing the network abnormity is used as the service feedback result, the failure reason is used as the service feedback result, so that the service failure problem analysis is clearer and more effective, and the maintenance efficiency is improved.
According to the embodiment of the present disclosure, the service processing method may further include: a traffic log is generated based on the traffic request. And storing the service log into a cache.
According to the embodiment of the disclosure, the intermediate server may define click events that may be triggered in the service request through a callback event to perform global monitoring, for example, to "receive the service request from the terminal device through an annotation manner. And determining the format of the service data, and performing format conversion on the service data under the condition that the format of the service data is determined to be inconsistent with the first target format to obtain the service data in the first target format. And sending the service data in the first target format to a server. The intermediate server determines a format of a service feedback result in response to receiving the service feedback result for the service data from the server. And under the condition that the format of the service feedback result is inconsistent with the second target format, performing format conversion on the service feedback result to generate the service feedback result in the second target format. And the intermediate server sends the service feedback result in the second target format to the terminal equipment for management in the whole process so as to generate a service log, and stores the service log in a cache. Thereby enriching the business functionality of the intermediate server for subsequent archiving, querying, and business troubleshooting. And then the problem is analyzed quickly, and the problem troubleshooting efficiency is improved.
It should be noted that, unless explicitly stated that a sequence of execution exists between different operations or a sequence of execution exists in technical implementation of different operations, an execution sequence between multiple operations may not be sequential, and multiple operations may also be executed at the same time in the flowchart in the embodiment of the present disclosure.
Fig. 5 schematically shows a block diagram of a traffic processing device according to an embodiment of the present disclosure.
As shown in fig. 5, the service processing apparatus 500 may include: an obtaining module 510, a first format conversion module 520, a first sending module 530, a second format conversion module 540, and a second sending module 550.
The obtaining module 510 is configured to obtain, in an annotation manner, a service request from a terminal device, where the service request includes service data.
The first format conversion module 520 is configured to perform format conversion on the service data to obtain service data in a first target format, where the first target format is a format matched with the server.
A first sending module 530, configured to send the service data in the first target format to the server.
The second format conversion module 540 is configured to perform format conversion on the service feedback result in response to receiving the service feedback result for the service data from the server, and generate a service feedback result in a second target format, where the second target format is a format matched with the terminal device.
A second sending module 550, configured to send the service feedback result in the second target format to the terminal device.
According to an embodiment of the present disclosure, the first format conversion module includes:
the first determining unit is used for determining the format of the service data.
And the serialization unit is used for carrying out serialization processing on the service data under the condition that the format of the service data is determined to be inconsistent with the first target format, so as to obtain the service data in the initial first target format.
And the encryption unit is used for encrypting the initial service data in the first target format to generate the service data in the first target format.
According to an embodiment of the present disclosure, the second format conversion module includes:
and the decryption unit is used for responding to the service feedback result aiming at the service data received from the server, decrypting the service feedback result and obtaining the decrypted service feedback result.
And the second determining unit is used for determining the format of the decrypted service feedback result.
And the deserializing unit is used for deserializing the service feedback result under the condition that the format of the decrypted service feedback result is inconsistent with the second target format to generate the service feedback result in the second target format.
According to an embodiment of the present disclosure, the second transmitting module includes: and a sending unit.
And the sending unit sends the service feedback result in the second target format to the main thread of the terminal equipment so as to display the service feedback result in the second target format on the terminal equipment by using the main thread.
According to an embodiment of the present disclosure, before the second format conversion module, the service processing apparatus further includes: the device comprises an analysis module, an abnormity determining module and a fault determining module.
And the analysis module is used for responding to the received service feedback result aiming at the service data from the server and analyzing the service feedback result by utilizing the program code processor to obtain the preset field data.
And the abnormity determining module is used for determining whether the service feedback result represents network abnormity based on the preset field data.
And the fault determining module is used for determining a fault reason based on the preset field data under the condition that the service feedback result represents the network abnormality, and taking the fault reason as the service feedback result.
According to the embodiment of the present disclosure, the service processing apparatus further includes: the device comprises a log generating module and a log storing module.
And the log generation module is used for generating a service log based on the service request.
And the log storage module is used for storing the service log into a cache.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the obtaining module 510, the first format conversion module 520, the first sending module 530, the second format conversion module 540, and the second sending module 550 may be combined and implemented in one module/unit/sub-unit, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to the embodiment of the present disclosure, at least one of the obtaining module 510, the first format conversion module 520, the first sending module 530, the second format conversion module 540, and the second sending module 550 may be at least partially implemented as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementation manners of software, hardware, and firmware, or implemented by a suitable combination of any several of them. Alternatively, at least one of the obtaining module 510, the first format conversion module 520, the first transmitting module 530, the second format conversion module 540, and the second transmitting module 550 may be at least partially implemented as a computer program module, which when executed, may perform a corresponding function.
It should be noted that, the service processing apparatus portion in the embodiment of the present disclosure corresponds to the service processing method portion in the embodiment of the present disclosure, and the description of the service processing apparatus portion specifically refers to the service processing method portion, which is not described herein again.
Fig. 6 schematically shows a block diagram of a computer system suitable for implementing the above described method according to an embodiment of the present disclosure. The computer system illustrated in FIG. 6 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 6, a computer system 600 according to an embodiment of the present disclosure includes a processor 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. Processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 601 may also include onboard memory for caching purposes. Processor 601 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the system 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. The processor 601 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or RAM 603. It is to be noted that the programs may also be stored in one or more memories other than the ROM 602 and RAM 603. The processor 601 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
System 600 may also include an input/output (I/O) interface 605, also connected to bus 604, in accordance with embodiments of the present disclosure. The system 600 may also include one or more of the following components connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; 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 driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that the computer program read out therefrom is mounted in the storage section 608 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure 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 storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program, when executed by the processor 601, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: 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), 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 present disclosure, 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.
For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include ROM 602 and/or RAM 603 and/or one or more memories other than ROM 602 and RAM 603 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method provided by the embodiments of the present disclosure, when the computer program product is run on an electronic device, the program code being configured to cause the electronic device to implement the business processing method provided by the embodiments of the present disclosure.
The computer program, when executed by the processor 601, performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, downloaded and installed through the communication section 609, and/or installed from the removable medium 611. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart 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 disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, 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. Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the disclosure, and these alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (10)

1. A service processing method comprises the following steps:
acquiring a service request from terminal equipment in an annotation mode, wherein the service request comprises service data;
performing format conversion on the service data to obtain service data in a first target format, wherein the first target format is a format matched with a server;
sending the service data in the first target format to the server;
responding to a service feedback result aiming at the service data from the server, performing format conversion on the service feedback result, and generating a service feedback result in a second target format, wherein the second target format is a format matched with the terminal equipment; and
and sending the service feedback result in the second target format to the terminal equipment.
2. The method of claim 1, wherein the converting the format of the service data to obtain the service data in the first target format comprises:
determining the format of the service data;
under the condition that the format of the service data is determined to be inconsistent with the first target format, performing serialization processing on the service data to obtain initial service data in the first target format; and
and encrypting the initial service data in the first target format to generate the service data in the first target format.
3. The method according to claim 1 or 2, wherein the converting format of the service feedback result in response to receiving the service feedback result for the service data from the server to generate the service feedback result in the second target format comprises:
in response to receiving the service feedback result aiming at the service data from the server, decrypting the service feedback result to obtain a decrypted service feedback result;
determining the format of the decrypted service feedback result; and
and under the condition that the format of the decrypted service feedback result is inconsistent with the second target format, performing deserialization processing on the service feedback result to generate a service feedback result in the second target format.
4. The method of claim 1, wherein the sending the service feedback result in the second target format to the terminal device comprises:
and sending the service feedback result in the second target format to a main thread of the terminal equipment so as to display the service feedback result in the second target format on the terminal equipment by using the main thread.
5. The method of claim 1, further comprising, before the format converting the service feedback result to generate a service feedback result in a second target format:
responding to a service feedback result aiming at the service data from the server, and analyzing the service feedback result by using a program code processor to obtain preset field data;
determining whether the service feedback result represents network abnormity or not based on the predetermined field data; and
and under the condition that the service feedback result represents network abnormality, determining a fault reason based on the preset field data, and taking the fault reason as the service feedback result.
6. The method of claim 1, further comprising:
generating a service log based on the service request; and
and storing the service log into a cache.
7. A traffic processing apparatus, comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a service request from terminal equipment in an annotation mode, and the service request comprises service data;
the first format conversion module is used for carrying out format conversion on the service data to obtain service data in a first target format, wherein the first target format is a format matched with the server;
the first sending module is used for sending the service data in the first target format to the server;
the second format conversion module is used for performing format conversion on the service feedback result in response to receiving the service feedback result aiming at the service data from the server to generate a service feedback result in a second target format, wherein the second target format is a format matched with the terminal equipment; and
and the second sending module is used for sending the service feedback result in the second target format to the terminal equipment.
8. An electronic device, comprising:
one or more processors;
a memory to store one or more instructions that,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
9. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 6.
10. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 6 when executed.
CN202210919048.7A 2022-08-01 2022-08-01 Service processing method and device, electronic equipment and storage medium Pending CN115268851A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210919048.7A CN115268851A (en) 2022-08-01 2022-08-01 Service processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210919048.7A CN115268851A (en) 2022-08-01 2022-08-01 Service processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115268851A true CN115268851A (en) 2022-11-01

Family

ID=83746700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210919048.7A Pending CN115268851A (en) 2022-08-01 2022-08-01 Service processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115268851A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116011006A (en) * 2022-12-14 2023-04-25 天星数科科技有限公司 Business data processing method, device, system and computer equipment
CN116450631A (en) * 2023-04-14 2023-07-18 北京字跳网络技术有限公司 Data processing method, device and electronic device
CN117997924A (en) * 2024-02-22 2024-05-07 深圳市集贤科技有限公司 Data transmission method, terminal equipment, server and data transmission system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116011006A (en) * 2022-12-14 2023-04-25 天星数科科技有限公司 Business data processing method, device, system and computer equipment
CN116450631A (en) * 2023-04-14 2023-07-18 北京字跳网络技术有限公司 Data processing method, device and electronic device
CN117997924A (en) * 2024-02-22 2024-05-07 深圳市集贤科技有限公司 Data transmission method, terminal equipment, server and data transmission system

Similar Documents

Publication Publication Date Title
CN115268851A (en) Service processing method and device, electronic equipment and storage medium
CN111782988B (en) Method, apparatus, computer system and storage medium for determining source of application program
CN113132489A (en) Method, device, computing equipment and medium for downloading file
CN113076224B (en) Data backup method, data backup system, electronic device and readable storage medium
CN112948900A (en) Method and device for acquiring data under link applied to block chain system
US20150281035A1 (en) Monitoring of Node.JS Applications
US9870303B2 (en) Monitoring and correlating a binary process in a distributed business transaction
CN113434241A (en) Page skipping method and device
CN115357761A (en) Link tracking method and device, electronic equipment and storage medium
CN112965916B (en) Page testing method, page testing device, electronic equipment and readable storage medium
CN113900834A (en) Data processing method, device, equipment and storage medium based on Internet of things technology
CN114844810A (en) Heartbeat data processing method, device, equipment and medium
CN113760252A (en) Data visualization method, device, computer system and readable storage medium
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN113176907A (en) Interface data calling method and device, computer system and readable storage medium
US20170147483A1 (en) Tracking asynchronous entry points for an application
CN114116509B (en) Program analysis method, device, electronic device and storage medium
CN113132400B (en) Business processing method, device, computer system and storage medium
CN114780361A (en) Log generation method, device, computer system and readable storage medium
CN114168269A (en) WebAssembly data execution method, device, equipment and medium
CN116561013B (en) Test methods, devices, electronic equipment and media based on the target service framework
US20160117304A1 (en) Standalone document management method
CN116701018A (en) Data processing method, data acquisition method, device, equipment and storage medium
CN113783835B (en) Password sharing method, device, equipment and storage medium
CN116700779A (en) Code dynamic adjustment method, device, equipment, medium and program product

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