CN111309498A - Request processing method, device and computer readable medium - Google Patents

Request processing method, device and computer readable medium Download PDF

Info

Publication number
CN111309498A
CN111309498A CN202010090573.3A CN202010090573A CN111309498A CN 111309498 A CN111309498 A CN 111309498A CN 202010090573 A CN202010090573 A CN 202010090573A CN 111309498 A CN111309498 A CN 111309498A
Authority
CN
China
Prior art keywords
request
end equipment
data
data processing
characteristic value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010090573.3A
Other languages
Chinese (zh)
Other versions
CN111309498B (en
Inventor
宋玉凝
刘牧
苑晓龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Huimao Electronic Port Co Ltd
Original Assignee
Shandong Huimao Electronic Port 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 Shandong Huimao Electronic Port Co Ltd filed Critical Shandong Huimao Electronic Port Co Ltd
Priority to CN202010090573.3A priority Critical patent/CN111309498B/en
Publication of CN111309498A publication Critical patent/CN111309498A/en
Application granted granted Critical
Publication of CN111309498B publication Critical patent/CN111309498B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • G06F9/548Object oriented; Remote method invocation [RMI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a request processing method, a device and a computer readable medium, wherein the method comprises the following steps: setting at least two data processing rules and at least one type of characteristic information; setting a mapping relation between the characteristic values and the data processing rules, wherein each rule corresponds to a characteristic value, the characteristic information of any two characteristic values corresponding to the same rule is different, and the characteristic value corresponding to any rule does not include the characteristic value corresponding to any other rule; when a front-end device sends a request, determining a rule corresponding to the characteristic value of the front-end device in the request according to the mapping relation; processing the request content in the request according to the rule to obtain the request content which can be processed by the back-end equipment and sending the request content to the back-end equipment; and processing corresponding data returned by the back-end equipment according to the rule to obtain data which can be processed by the front-end equipment and sending the data to the front-end equipment. The scheme can reduce the occupation of front-end resources.

Description

Request processing method, device and computer readable medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a request processing method and apparatus, and a computer-readable medium.
Background
In the conventional method, the development process of the web app includes: the back end obtains data from the database, and transmits the data to the front end in a JSON (JavaScript Object Notation) format, so that the front end performs subsequent function development according to the JSON data, and the JSON data is presented to the user in a specific mode. The front end may also collect user-side data and pass to the back end in JSON format.
At present, in the data interaction process between the back end and the front end, when there are multiple front ends, the same data may be used under different front end functions. When the same function is developed under different front ends respectively, for example, when the same app needs to be opened in an ios device and a windows browser, the back-end interfaces called by the front ends are usually the same. The back-end interface usually returns only the same data, so that developers at the front ends need to process the data returned by the back-end to adapt to the respective front ends.
However, this operation may occupy large front-end resources.
Disclosure of Invention
The invention provides a request processing method, a request processing device and a computer readable medium, which can reduce occupation of front-end resources.
In order to achieve the purpose, the invention is realized by the following technical scheme:
in a first aspect, the present invention provides a request processing method, which sets at least two data processing rules and at least one type of feature information, wherein each type of feature information corresponds to at least two feature values;
setting a mapping relation between the characteristic value and the data processing rule, wherein the mapping requirement of the mapping relation comprises: each data processing rule corresponds to at least one characteristic value, the characteristic information of any two characteristic values corresponding to the same data processing rule is different, and the characteristic value corresponding to any data processing rule does not include the characteristic value corresponding to any other data processing rule;
further comprising:
receiving a first request sent by an external front-end device, wherein the first request comprises first request content and at least one first characteristic value of the front-end device;
determining a first data processing rule corresponding to the at least one first characteristic value according to the mapping relation;
processing the first request content according to the first data processing rule to obtain a request content which can be processed by external back-end equipment, and sending the obtained request content to the back-end equipment;
receiving first data returned by the back-end equipment through processing the received request content;
and processing the first data according to the first data processing rule to obtain data which can be processed by the front-end equipment, and sending the obtained data to the front-end equipment.
Further, the at least one feature information includes: any one or more of the device type, the display screen size, the operating system, the identity of the device login user and the device manufacturer of the front-end device.
Further, the method further comprises:
receiving a change request input from outside;
determining a request type of the change request;
when the request type is that any data processing rule in the mapping relation is changed, executing the change request and ending the current process;
and when the request type is to change the characteristic value corresponding to any data processing rule in the mapping relation, judging whether each characteristic value after expected change corresponds to one piece of characteristic information, if so, further judging whether the mapping relation after expected change meets the mapping requirement, and if so, executing the change request.
In a second aspect, the present invention provides a request processing apparatus, including:
the system comprises a setting unit, a processing unit, a front-end equipment interaction unit and a back-end equipment interaction unit;
the setting unit is used for setting at least two data processing rules and at least one type of characteristic information, wherein each type of characteristic information corresponds to at least two characteristic values; setting a mapping relation between the characteristic value and the data processing rule, wherein the mapping requirement of the mapping relation comprises: each data processing rule corresponds to at least one characteristic value, the characteristic information of any two characteristic values corresponding to the same data processing rule is different, and the characteristic value corresponding to any data processing rule does not include the characteristic value corresponding to any other data processing rule;
the front-end equipment interaction unit is used for receiving a first request sent by external front-end equipment, wherein the first request comprises first request content and at least one first characteristic value of the front-end equipment;
the back-end equipment interaction unit is used for sending the request content sent by the processing unit to external back-end equipment; receiving first data returned by the back-end equipment through processing the received request content, and sending the first data to the processing unit;
the processing unit is used for determining a first data processing rule corresponding to the at least one first characteristic value according to the mapping relation; processing the first request content according to the first data processing rule to obtain a request content which can be processed by the back-end equipment, and sending the obtained request content to the back-end equipment interaction unit; and processing the first data sent by the back-end equipment interaction unit according to the first data processing rule to obtain data which can be processed by corresponding front-end equipment, and triggering the front-end equipment interaction unit to send the obtained data to the corresponding front-end equipment.
Further, the at least one feature information includes: any one or more of the device type, the display screen size, the operating system, the identity of the device login user and the device manufacturer of the front-end device.
Further, the setting unit is used for receiving a change request input from the outside; determining a request type of the change request; when the request type is that any data processing rule in the mapping relation is changed, executing the change request and ending; and when the request type is to change the characteristic value corresponding to any data processing rule in the mapping relation, judging whether each characteristic value after expected change corresponds to one piece of characteristic information, if so, further judging whether the mapping relation after expected change meets the mapping requirement, and if so, executing the change request.
Further, the request processing device is provided in the backend apparatus.
In a third aspect, the present invention provides a request processing system, comprising: a backend device, a request processing apparatus according to any one of the above second aspects, and at least one front-end device;
the request processing device is respectively connected with the back-end equipment and each front-end equipment;
each front-end device is used for sending an externally input request to the request processing device;
the back-end equipment is used for setting a request processing rule; receiving request content sent by the request processing device; processing the request content according to the request processing rule; and returning the data obtained by processing the request content to the request processing device.
In a fourth aspect, the present invention provides a request processing apparatus, including: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine-readable program to perform the method of any of the above first aspects.
In a fifth aspect, the present invention provides a computer readable medium having stored thereon computer instructions which, when executed by a processor, cause the processor to perform the method of any of the first aspects above.
The invention provides a request processing method, a device and a computer readable medium, wherein the method comprises the following steps: setting at least two data processing rules and at least one type of characteristic information; setting a mapping relation between the characteristic values and the data processing rules, wherein each rule corresponds to a characteristic value, the characteristic information of any two characteristic values corresponding to the same rule is different, and the characteristic value corresponding to any rule does not include the characteristic value corresponding to any other rule; when a front-end device sends a request, determining a rule corresponding to the characteristic value of the front-end device in the request according to the mapping relation; processing the request content in the request according to the rule to obtain the request content which can be processed by the back-end equipment and sending the request content to the back-end equipment; and processing corresponding data returned by the back-end equipment according to the rule to obtain data which can be processed by the front-end equipment and sending the data to the front-end equipment. The invention can reduce the occupation of front-end resources.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a request processing method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a request processing apparatus according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a request processing system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a request processing method, which may include the following steps:
step 101: setting at least two data processing rules and at least one type of characteristic information, wherein each type of characteristic information corresponds to at least two characteristic values;
step 102: setting a mapping relation between the characteristic value and the data processing rule, wherein the mapping requirement of the mapping relation comprises: each data processing rule corresponds to at least one characteristic value, the characteristic information of any two characteristic values corresponding to the same data processing rule is different, and the characteristic value corresponding to any data processing rule does not include the characteristic value corresponding to any other data processing rule;
step 103: receiving a first request sent by an external front-end device, wherein the first request comprises first request content and at least one first characteristic value of the front-end device;
step 104: determining a first data processing rule corresponding to the at least one first characteristic value according to the mapping relation;
step 105: processing the first request content according to the first data processing rule to obtain a request content which can be processed by external back-end equipment, and sending the obtained request content to the back-end equipment;
step 106: receiving first data returned by the back-end equipment through processing the received request content;
step 107: and processing the first data according to the first data processing rule to obtain data which can be processed by the front-end equipment, and sending the obtained data to the front-end equipment.
The request processing method provided by the embodiment of the invention comprises the following steps: setting at least two data processing rules and at least one type of characteristic information; setting a mapping relation between the characteristic values and the data processing rules, wherein each rule corresponds to a characteristic value, the characteristic information of any two characteristic values corresponding to the same rule is different, and the characteristic value corresponding to any rule does not include the characteristic value corresponding to any other rule; when a front-end device sends a request, determining a rule corresponding to the characteristic value of the front-end device in the request according to the mapping relation; processing the request content in the request according to the rule to obtain the request content which can be processed by the back-end equipment and sending the request content to the back-end equipment; and processing corresponding data returned by the back-end equipment according to the rule to obtain data which can be processed by the front-end equipment and sending the data to the front-end equipment.
Based on the above, the main body executing the request processing method can interact with each front-end device respectively, and can interact with the back-end device, so that the data sent to the back-end device and each front-end device is the data that can be directly processed by the main body, and the main body does not need to process the data by the back-end device and each front-end device. Of course, the execution main body is not provided in any front-end apparatus. Therefore, the embodiment of the invention can reduce the occupation of front-end resources. In addition, in order to enable the back-end equipment and each front-end equipment to be matched with the back-end equipment and each front-end equipment, when the requirements of the back-end equipment or any front-end equipment are changed, only the setting information needs to be adjusted, the execution main body can perform data processing based on the adjusted mapping relation subsequently, and the information adjusting operation is simple.
In detail, the front-end device may be a device corresponding to a front end of a web app, such as a mobile phone, a computer, and the like. The backend device may be a device corresponding to a backend of the web app, such as a server, a server cluster, and the like.
In an embodiment of the present invention, a main body for executing the request processing method may be a webapp development module based on a web service, and specifically, such a service module may be embedded in the backend service or between the backend service, and is used for simultaneously adapting the data structures of the front end and the back end.
In one embodiment of the invention, the request sent by the front end can comprise a request header and a request body. The request header may include various feature values of the head-end device, and the request body may include the request content.
In the embodiment of the invention, a new service module is added to execute the request processing method so as to achieve the adaptation between the front end and the back end. Specifically, the developer of the service module can know the requirements of the front-end developer and the back-end developer under different terminals and different functions, and know the whole project function, so that the data processing rule, the characteristic information and the mapping relation can be preset according to the requirements.
For example, when the front-end calls a request for modifying personal information, the service module may record the operation type, the fields involved, unify the differences between the format required by the back-end and the format passed by the front-end, compare the parameter names of the variables of the front-end and the back-end, the format of the data to be returned, and so on. Thus, the request sent by the front end can be processed correspondingly.
It can be seen that the request processing method provided by the embodiment of the present invention at least has the following characteristics:
1. data interaction between the front end and the back end can be realized;
2. a rear-end developer does not need to learn various front-end technologies;
3. in the back-end development process, a plurality of interfaces are not required to be developed aiming at the same function;
4. the front-end development does not need to process the back-end data too much, saves the development time, enhances the stability of the front-end, and can reduce the program operation load by a simple front-end structure when the user requests;
5. when the front end or the back end adjusts the data structure, the adaptation can be carried out again only by updating the mapping relation or adding new mapping;
6. providing convenience for personalizing a user interface using a web service.
In one embodiment of the present invention, the at least one feature information includes: any one or more of the device type, the display screen size, the operating system, the identity of the device login user and the device manufacturer of the front-end device.
For example, the characteristic value of the device type may be a mobile phone, a tablet, a desktop, a personal computer, etc., the characteristic value of the operating system may be android, ios, windows7, etc., the characteristic value of the identity of the device login user may be a visitor, a login user, etc., and the characteristic value of the device manufacturer may be huashi corporation, apple corporation, millet corporation, etc.
Based on different characteristic values of the characteristic information, personalized display of the front end can be achieved, so that the method is suitable for different front end users, and user experience is improved.
For example, taking a visitor and a request for browsing courses initiated at the same time of reading a student as an example, the following explanation is made for the embodiment of the present invention:
and the unregistered tourist enters an official website interface from the browser and browses the current college example curriculum. Via the front end display, this example course includes the Linux operating system with a C + + profile, calculus 1, and signal technology profiles. In addition, the guest can only see the name of the example course and the college that opened the course, as well as the course profile. The information is presented in the form of a card at the front end. Assume that the required data format is an object for the front-end component.
At the same function-displayed page on the logged-in user's (e.g., at the reading student) side, the student logs in from the mobile app and submits personal information when requesting to obtain a list of optional courses. Based on this, the information displayed at the front end can see more information, including the lecturer of the class, the class level (information such as the exclusive property of the subject/researcher) and the information whether the current logged-in user can repair the class, besides the basic class information which can be seen by the tourist. Here, the front end may use an assembly of folded panels to display this portion of the information. Assume that the required data structure for the front-end component is an array of multiple objects.
In the existing realization mode of direct interaction between the front end and the back end, when a tourist and a student respectively call an interface with the same function, the front end of the tourist and the front end of the student respectively need to acquire the same interface, and then the front end and the student respectively operate to meet the requirements of the front end. If the data returned by the back end is an array composed of objects, the front end of the student end can be directly used, and the front end of the tourist end needs to change the array into the objects.
In the embodiment of the present invention, the service module may be added at the back end side, and is specially adapted to different front ends, and the feature information of devices, components, and the like is acquired in the request header of the front end request, analyzed and mapped, and then the data returned by the back end is processed, and the processed data is returned to the front end.
Taking the front end corresponding to the visitor as the front end 1 and the front end corresponding to the student as the front end 2 as an example, the following contents may exist:
the data required by the front end 1 are unit _ code, unit _ name and failure of the course, and the required format is an object;
the data required by the front end 2 are unit _ code, unit _ name, failure, alternative and level of the course, and the required format is an array of objects;
the data returned by the back end comprises unit _ code, unit _ name, failure, alternative and level, and is returned in an array format, and other data are returned at the same time;
the newly added service module obtains metadata requested by the front end, such as key and format of the required object, and maps the metadata into the written program, and then returns a corresponding result to the written program.
Therefore, compared with the existing implementation mode of direct interaction between the front end and the back end, the embodiment of the invention can realize the interaction between the front end and the back end through the data statement joint debugging function of the newly added service module, and can reduce the occupation of front end resources.
In step 105, the requested content is processed according to the data processing rule, and in this processing process, it may be determined whether data processing is required according to the data processing rule. And executing corresponding processing when data processing is needed, wherein the request contents before and after the processing can be consistent if the data processing is not needed. For example, when the data processing rule only involves data format conversion, if the data output by the front end and the back end are properly consistent, it can be determined that no data processing is needed. Similarly, in step 107, when processing the data returned by the backend device, it may be determined whether data processing is needed.
In one embodiment of the present invention, the method may further include: receiving a change request input from outside; determining a request type of the change request; when the request type is that any data processing rule in the mapping relation is changed, executing the change request and ending the current process; and when the request type is to change the characteristic value corresponding to any data processing rule in the mapping relation, judging whether each characteristic value after expected change corresponds to one piece of characteristic information, if so, further judging whether the mapping relation after expected change meets the mapping requirement, and if so, executing the change request.
In detail, when the developer updates the mapping relationship as required, self-checking can be performed on the expected effect which can be achieved by executing the updating, so as to ensure the accurate updating of the mapping relationship, and further ensure the adaptation between the front end and the back end. Of course, when the self-checking fails, the corresponding self-checking error reason can be output and displayed.
In summary, under the condition that a rear-end developer does not need to know front-end knowledge and the front end does not need to be additionally developed, the webapp development structure is adjusted, a new service module is added, and the purposes of front-end and rear-end adaptation and front-end resource occupation reduction can be achieved.
As shown in fig. 2, an embodiment of the present invention provides a request processing apparatus, which may include:
a setting unit 201, a processing unit 202, a front-end device interaction unit 203 and a back-end device interaction unit 204;
the setting unit 201 is configured to set at least two data processing rules and at least one type of feature information, where each type of feature information corresponds to at least two feature values; setting a mapping relation between the characteristic value and the data processing rule, wherein the mapping requirement of the mapping relation comprises: each data processing rule corresponds to at least one characteristic value, the characteristic information of any two characteristic values corresponding to the same data processing rule is different, and the characteristic value corresponding to any data processing rule does not include the characteristic value corresponding to any other data processing rule;
the front-end device interaction unit 203 is configured to receive a first request sent by an external front-end device, where the first request includes first request content and at least one first feature value of the front-end device;
the backend device interaction unit 204 is configured to send the request content sent by the processing unit 202 to an external backend device; receiving first data returned by the backend device by processing the received request content, and sending the first data to the processing unit 202;
the processing unit 202 is configured to determine, according to the mapping relationship, a first data processing rule corresponding to the at least one first feature value; processing the first request content according to the first data processing rule to obtain a request content which can be processed by the backend device, and sending the obtained request content to the backend device interaction unit 204; according to the first data processing rule, the first data sent by the backend device interaction unit 204 is processed to obtain data that can be processed by the corresponding frontend device, and the frontend device interaction unit 203 is triggered to send the obtained data to the corresponding frontend device.
In one embodiment of the present invention, the at least one feature information includes: any one or more of the device type, the display screen size, the operating system, the identity of the device login user and the device manufacturer of the front-end device.
In an embodiment of the present invention, the setting unit 201 is configured to receive a change request input from outside; determining a request type of the change request; when the request type is that any data processing rule in the mapping relation is changed, executing the change request and ending; and when the request type is to change the characteristic value corresponding to any data processing rule in the mapping relation, judging whether each characteristic value after expected change corresponds to one piece of characteristic information, if so, further judging whether the mapping relation after expected change meets the mapping requirement, and if so, executing the change request.
In an embodiment of the present invention, the request processing apparatus is disposed in the backend device.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
As shown in fig. 3, an embodiment of the present invention provides a request processing system, which may include: a backend device 301, any one of the request processing apparatuses 302 described above, and at least one front-end device 303;
the request processing device 302 is connected to the backend device 301 and each of the front-end devices 303 respectively;
each of the front-end devices 303 is configured to send an externally input request to the request processing apparatus 302;
the backend device 301 is configured to set a request processing rule; receiving the request content sent by the request processing device 302; processing the request content according to the request processing rule; the data obtained by processing the request content is returned to the request processing device 302.
Embodiments of the present invention also provide a computer-readable medium storing instructions for causing a computer to perform a request processing method as described herein. Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the above-described embodiments are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion unit to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
In summary, the embodiments of the present invention have at least the following advantages:
1. the request processing method provided by the embodiment of the invention comprises the following steps: setting at least two data processing rules and at least one type of characteristic information; setting a mapping relation between the characteristic values and the data processing rules, wherein each rule corresponds to a characteristic value, the characteristic information of any two characteristic values corresponding to the same rule is different, and the characteristic value corresponding to any rule does not include the characteristic value corresponding to any other rule; when a front-end device sends a request, determining a rule corresponding to the characteristic value of the front-end device in the request according to the mapping relation; processing the request content in the request according to the rule to obtain the request content which can be processed by the back-end equipment and sending the request content to the back-end equipment; and processing corresponding data returned by the back-end equipment according to the rule to obtain data which can be processed by the front-end equipment and sending the data to the front-end equipment. The embodiment of the invention can reduce the occupation of front-end resources.
2. The request processing method provided by the embodiment of the invention at least has the following characteristics: data interaction between the front end and the back end can be realized; a rear-end developer does not need to learn various front-end technologies; in the back-end development process, a plurality of interfaces are not required to be developed aiming at the same function; the front-end development does not need to process the back-end data too much, saves the development time, enhances the stability of the front-end, and can reduce the program operation load by a simple front-end structure when the user requests; when the front end or the back end adjusts the data structure, the adaptation can be carried out again only by updating the mapping relation or adding new mapping; providing convenience for personalizing a user interface using a web service.
3. Compared with the existing implementation mode of direct front-end and back-end interaction, the implementation mode of the invention can realize the interaction between the front end and the back end by the data statement joint debugging function of the newly added service module, and can reduce the occupation of front-end resources.
4. In the embodiment of the invention, under the condition that a rear-end developer does not need to know front-end knowledge and the front end does not need to be additionally developed, the development structure of the webapp is adjusted, and a new service module is added, so that the purposes of adapting between the front end and the rear end and reducing the occupation of front-end resources can be achieved.
It should be noted that not all steps and modules in the above flows and system structure diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution order of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by a plurality of physical entities, or some components in a plurality of independent devices may be implemented together.
In the above embodiments, the hardware unit may be implemented mechanically or electrically. For example, a hardware element may comprise permanently dedicated circuitry or logic (such as a dedicated processor, FPGA or ASIC) to perform the corresponding operations. The hardware elements may also comprise programmable logic or circuitry, such as a general purpose processor or other programmable processor, that may be temporarily configured by software to perform the corresponding operations. The specific implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
While the invention has been shown and described in detail in the drawings and in the preferred embodiments, it is not intended to limit the invention to the embodiments disclosed, and it will be apparent to those skilled in the art that various combinations of the code auditing means in the various embodiments described above may be used to obtain further embodiments of the invention, which are also within the scope of the invention.

Claims (10)

1. A request processing method, characterized in that,
setting at least two data processing rules and at least one type of characteristic information, wherein each type of characteristic information corresponds to at least two characteristic values;
setting a mapping relation between the characteristic value and the data processing rule, wherein the mapping requirement of the mapping relation comprises: each data processing rule corresponds to at least one characteristic value, the characteristic information of any two characteristic values corresponding to the same data processing rule is different, and the characteristic value corresponding to any data processing rule does not include the characteristic value corresponding to any other data processing rule;
further comprising:
receiving a first request sent by an external front-end device, wherein the first request comprises first request content and at least one first characteristic value of the front-end device;
determining a first data processing rule corresponding to the at least one first characteristic value according to the mapping relation;
processing the first request content according to the first data processing rule to obtain a request content which can be processed by external back-end equipment, and sending the obtained request content to the back-end equipment;
receiving first data returned by the back-end equipment through processing the received request content;
and processing the first data according to the first data processing rule to obtain data which can be processed by the front-end equipment, and sending the obtained data to the front-end equipment.
2. The method of claim 1,
the at least one feature information includes: any one or more of the device type, the display screen size, the operating system, the identity of the device login user and the device manufacturer of the front-end device.
3. The method of claim 1 or 2, further comprising:
receiving a change request input from outside;
determining a request type of the change request;
when the request type is that any data processing rule in the mapping relation is changed, executing the change request and ending the current process;
and when the request type is to change the characteristic value corresponding to any data processing rule in the mapping relation, judging whether each characteristic value after expected change corresponds to one piece of characteristic information, if so, further judging whether the mapping relation after expected change meets the mapping requirement, and if so, executing the change request.
4. A request processing apparatus, comprising:
the system comprises a setting unit, a processing unit, a front-end equipment interaction unit and a back-end equipment interaction unit;
the setting unit is used for setting at least two data processing rules and at least one type of characteristic information, wherein each type of characteristic information corresponds to at least two characteristic values; setting a mapping relation between the characteristic value and the data processing rule, wherein the mapping requirement of the mapping relation comprises: each data processing rule corresponds to at least one characteristic value, the characteristic information of any two characteristic values corresponding to the same data processing rule is different, and the characteristic value corresponding to any data processing rule does not include the characteristic value corresponding to any other data processing rule;
the front-end equipment interaction unit is used for receiving a first request sent by external front-end equipment, wherein the first request comprises first request content and at least one first characteristic value of the front-end equipment;
the back-end equipment interaction unit is used for sending the request content sent by the processing unit to external back-end equipment; receiving first data returned by the back-end equipment through processing the received request content, and sending the first data to the processing unit;
the processing unit is used for determining a first data processing rule corresponding to the at least one first characteristic value according to the mapping relation; processing the first request content according to the first data processing rule to obtain a request content which can be processed by the back-end equipment, and sending the obtained request content to the back-end equipment interaction unit; and processing the first data sent by the back-end equipment interaction unit according to the first data processing rule to obtain data which can be processed by corresponding front-end equipment, and triggering the front-end equipment interaction unit to send the obtained data to the corresponding front-end equipment.
5. The request processing apparatus according to claim 4,
the at least one feature information includes: any one or more of the device type, the display screen size, the operating system, the identity of the device login user and the device manufacturer of the front-end device.
6. The request processing apparatus according to claim 4,
the setting unit is used for receiving a change request input from the outside; determining a request type of the change request; when the request type is that any data processing rule in the mapping relation is changed, executing the change request and ending; and when the request type is to change the characteristic value corresponding to any data processing rule in the mapping relation, judging whether each characteristic value after expected change corresponds to one piece of characteristic information, if so, further judging whether the mapping relation after expected change meets the mapping requirement, and if so, executing the change request.
7. The request processing apparatus according to any one of claims 4 to 6,
the request processing device is arranged in the back-end equipment.
8. A request processing system, comprising:
a back-end device, a request processing apparatus as claimed in any one of claims 4 to 7, and at least one front-end device;
the request processing device is respectively connected with the back-end equipment and each front-end equipment;
each front-end device is used for sending an externally input request to the request processing device;
the back-end equipment is used for setting a request processing rule; receiving request content sent by the request processing device; processing the request content according to the request processing rule; and returning the data obtained by processing the request content to the request processing device.
9. A request processing apparatus, comprising: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor, configured to invoke the machine readable program, to perform the method of any of claims 1 to 3.
10. A computer readable medium having stored thereon computer instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1 to 3.
CN202010090573.3A 2020-02-13 2020-02-13 Request processing method, apparatus and computer readable medium Active CN111309498B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010090573.3A CN111309498B (en) 2020-02-13 2020-02-13 Request processing method, apparatus and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010090573.3A CN111309498B (en) 2020-02-13 2020-02-13 Request processing method, apparatus and computer readable medium

Publications (2)

Publication Number Publication Date
CN111309498A true CN111309498A (en) 2020-06-19
CN111309498B CN111309498B (en) 2023-09-15

Family

ID=71154497

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010090573.3A Active CN111309498B (en) 2020-02-13 2020-02-13 Request processing method, apparatus and computer readable medium

Country Status (1)

Country Link
CN (1) CN111309498B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002297418A (en) * 2001-03-30 2002-10-11 Fujitsu Ltd Operation control device, operation control system and computer program
US20110153624A1 (en) * 2009-12-18 2011-06-23 Sap Ag Data model access configuration and customization
CN104756079A (en) * 2012-10-23 2015-07-01 日本电气株式会社 Rule distribution server, as well as event processing system, method, and program
CN108897691A (en) * 2018-06-29 2018-11-27 百度在线网络技术(北京)有限公司 Data processing method, device, server and medium based on interface analog service
CN109491905A (en) * 2018-11-02 2019-03-19 北京金山云网络技术有限公司 Head end test method, apparatus and electronic equipment
CN110347974A (en) * 2019-05-30 2019-10-18 重庆金融资产交易所有限责任公司 Data processing method, device, computer equipment and storage medium
CN110457260A (en) * 2019-08-14 2019-11-15 深圳前海微众银行股份有限公司 Document handling method, device, equipment and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002297418A (en) * 2001-03-30 2002-10-11 Fujitsu Ltd Operation control device, operation control system and computer program
US20110153624A1 (en) * 2009-12-18 2011-06-23 Sap Ag Data model access configuration and customization
CN104756079A (en) * 2012-10-23 2015-07-01 日本电气株式会社 Rule distribution server, as well as event processing system, method, and program
CN108897691A (en) * 2018-06-29 2018-11-27 百度在线网络技术(北京)有限公司 Data processing method, device, server and medium based on interface analog service
CN109491905A (en) * 2018-11-02 2019-03-19 北京金山云网络技术有限公司 Head end test method, apparatus and electronic equipment
CN110347974A (en) * 2019-05-30 2019-10-18 重庆金融资产交易所有限责任公司 Data processing method, device, computer equipment and storage medium
CN110457260A (en) * 2019-08-14 2019-11-15 深圳前海微众银行股份有限公司 Document handling method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN111309498B (en) 2023-09-15

Similar Documents

Publication Publication Date Title
CN107861713B (en) Data calling method and device and computer readable storage medium
CN106919509B (en) Client generation method and device and electronic equipment
CN107193681B (en) Data verification method and device
CN110162408B (en) Data processing method, device, equipment and machine-readable medium
CN110889270A (en) Form page document generation method and form page rendering method and device
KR102274561B1 (en) Transaction system error detection method, apparatus, storage medium and computer device
US20160224530A1 (en) Mapping stored client data to requested data using metadata
EP3180714A1 (en) Form filling method and related terminal
CN111274781A (en) Table display method and device, storage medium and electronic equipment
CN112684968A (en) Page display method and device, electronic equipment and computer readable medium
CN110838071A (en) Policy data processing method and device and server
CN109684008A (en) Card rendering method, device, terminal and computer readable storage medium
CN110727417A (en) Data processing method and device
CN111506579A (en) Method, program and equipment for generating intelligent contract code
CN108089972B (en) Interface test method and device
CN105743725A (en) Method and device for testing application programs
CN112799760B (en) Form rendering method and device
CN108809896A (en) A kind of information calibration method, device and electronic equipment
CN113778897A (en) Automatic test method, device, equipment and storage medium of interface
CN113408254A (en) Page form information filling method, device, equipment and readable medium
CN113515395A (en) Application access method and device based on multi-cloud management platform
CN113190229A (en) Method and device for generating government affair page
CN111309498A (en) Request processing method, device and computer readable medium
CN110532494A (en) Users' personal allocation method, system and the computer equipment of B/S application
CN105739717A (en) Information input method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant