CN107168971B - Data processing method and device for webpage application - Google Patents

Data processing method and device for webpage application Download PDF

Info

Publication number
CN107168971B
CN107168971B CN201610128645.2A CN201610128645A CN107168971B CN 107168971 B CN107168971 B CN 107168971B CN 201610128645 A CN201610128645 A CN 201610128645A CN 107168971 B CN107168971 B CN 107168971B
Authority
CN
China
Prior art keywords
server
format
transmission format
information
type
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.)
Active
Application number
CN201610128645.2A
Other languages
Chinese (zh)
Other versions
CN107168971A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610128645.2A priority Critical patent/CN107168971B/en
Publication of CN107168971A publication Critical patent/CN107168971A/en
Application granted granted Critical
Publication of CN107168971B publication Critical patent/CN107168971B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a data processing method and device for a webpage application. Wherein, the method comprises the following steps: the front end of the webpage application generates a first object through the received first information, wherein the data transmission format of the first object is not matched with the transmission format of a server of the webpage application; the front end of the webpage application converts the data transmission format of the first object according to the conversion information acquired in advance to obtain a second object, wherein the data transmission format of the second object is matched with the transmission format of the server; the front end of the web application sends the second object to the server. The method and the device solve the problem that the BSON data can not be transmitted in the foreground and the background in the prior art, and realize correct and efficient transmission of the information of the webpage application between the front end and the background.

Description

Data processing method and device for webpage application
Technical Field
The application relates to the field of internet, in particular to a data processing method and device for webpage application.
Background
In many current web applications (i.e. web applications), foreground and background data interaction is data in JSON format, and as shown in fig. 1, conventional web application foreground and background interaction can be realized by the following steps:
step S101: the front end receives user input.
Step S102: the front end generates a JSON object based on user input and sends a request to the backend.
The request may be a query request, and the JSON object is carried in the request.
And S103, analyzing the data by a background (such as a server) to obtain an analysis result.
Step S104: and the background processes the corresponding background service according to the analysis result.
Step S105: and feeding back a processing result after the background service is processed.
However, when the client page receives the information input by the user and transmits the input information according to the BSON format (i.e. the data type in the MongoDB) when developing the DMS for MongoDB, the BSON exceeds the processing scope of the server, for example, the user inputs the following data:
{id:”123”,date:ISODate(),
"Timestamp":Timestamp(1445571810,1),
"Minkey":MinKey,
"Maxkey":MaxKey}
the attribute of the data exceeds the scope of JSON, so that the data cannot be transmitted at the front end and the background.
In addition, redundant fields are used in the export-import format of the MongoDB itself, and the MongoDB specifies that the Key of the data may not begin with $ e.g., it is not possible to transmit data of a MinKey type by { $ MinKey:1} as data of a MinKey. The method has obvious defects that firstly, the redundancy of fields directly deepens the hierarchy of a document, secondly, the method has no universality, and the premise that the MongoDB artificially specifies that Key of common data cannot begin with $ so that the MongoDB cannot even transmit simple data such as { $ haha: "haha" }.
Aiming at the problem that the BSON data can not be transmitted in the foreground and the background, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the application provides a data processing method and device for webpage application, and aims to at least solve the technical problem that BSON data cannot be transmitted in a foreground and a background.
According to an aspect of an embodiment of the present application, there is provided a data processing method for a web application, the method including: the method comprises the steps that a front end of a webpage application generates a first object through received first information, wherein the data transmission format of the first object is not matched with the transmission format of a server of the webpage application; the front end of the webpage application converts the data transmission format of the first object to obtain a second object according to conversion information acquired in advance, wherein the data transmission format of the second object is matched with the transmission format of the server; and the front end of the webpage application sends the second object to the server.
According to another aspect of the embodiments of the present application, there is also provided a data processing method for a web application, the method including: the method comprises the steps that a server receives a second object sent by the front end of a webpage application, wherein the data transmission format of the second object is matched with the transmission format of the server; and the server analyzes the second object according to the conversion information acquired in advance to obtain the first information carried by the second object.
According to another aspect of the embodiments of the present application, there is also provided a data processing apparatus for a web application, where the apparatus is arranged at a front end of the web application, and includes: a receiving unit, configured to generate a first object through the received first information, where a data transmission format of the first object does not match a transmission format of a server of the web application; the conversion unit is used for converting the data transmission format of the first object according to the conversion information acquired in advance to obtain a second object, wherein the data transmission format of the second object is matched with the transmission format of the server; a sending unit, configured to send the second object to the server.
Optionally, the conversion unit includes: the query module is used for querying a type format corresponding to the object type in the pre-acquired conversion information, wherein the pre-acquired conversion information records the corresponding relation between the object type and the type format; and the conversion module is used for converting the data transmission format of the first object into the type format to obtain the second object under the condition that the type format corresponding to the object type is inquired.
Optionally, the apparatus further comprises: the judging unit is used for judging whether the data transmission format of the object type is matched with the transmission format of the server or not by the front end before the front end converts the data transmission format of the first object into the type format; the conversion module includes: and if the data transmission format of the object type is not matched with the transmission format of the server, converting the data transmission format of the first object into the type format.
Optionally, the first object is a BSON object, and the conversion unit includes: and the object conversion module is used for converting the BSON object into a corresponding JSON object to obtain a JSON character string, wherein the JSON object is the second object.
Optionally, the apparatus further comprises: and the return unit is used for receiving a third object returned by the server by the front end of the webpage application after the second object is sent to the server by the front end of the webpage application, wherein the third object comprises second information obtained by the server executing the second object, and the data transmission format of the third object conforms to the transmission format of the client of the webpage application.
Optionally, the web application is a web application of a distributed document storage database.
According to another aspect of the embodiments of the present application, there is also provided a data processing apparatus for a web application, the apparatus being disposed on a server of the web application, including: the receiving unit is used for receiving a second object sent by the front end of the webpage application, wherein the data transmission format of the second object is matched with the transmission format of the server; and the processing unit is used for analyzing the second object by the server according to the pre-acquired conversion information to obtain the first information carried by the second object.
Optionally, the apparatus further comprises: the execution unit is used for executing the operation indicated by the first information after the first information carried by the second object is obtained, and obtaining second information; a generating unit, configured to generate a third object from the second information according to the conversion information obtained in advance, where a data transmission format of the third object matches a transmission format of a front end of the web application; and the sending unit is used for sending the third object to the front end of the webpage application.
Optionally, the processing unit comprises: a determining module, configured to determine a value of the second object by using the second object as a character string; the query module is used for querying the type format to which the value of the second object belongs in the pre-acquired conversion information; and the analysis unit is used for analyzing the first information carried in the second object according to the type format under the condition that the type format to which the value of the second object belongs is inquired.
By adopting the above embodiment of the application, after the front end generates the first object based on the received first information, the data transmission format of the first object is converted, the data transmission format is converted into the transmission format of the server, and the second object after the conversion format is used for transmission between the front end and the background server. By the embodiment, the BSON format data can be converted into the JSON format data, the JSON format data is transmitted between the front end and the server, and the server can correctly receive and analyze the converted JSON format data, so that the problem that the BSON data cannot be transmitted between the front end and the background in the prior art is solved, and the information of the webpage application can be correctly and efficiently transmitted between the front end and the background.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is an interaction diagram of a background interaction of a web page according to the prior art;
fig. 2 is a block diagram of a hardware structure of a computer terminal of a data processing method for a web application according to an embodiment of the present application;
FIG. 3 is a flow chart of an alternative data processing method for a web application according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an alternative Web application foreground and background interaction in accordance with an embodiment of the present application;
FIG. 5 is a flow chart of an alternative data processing method for a web application according to an embodiment of the present application;
FIG. 6(a) is a flowchart of an alternative data processing method for a web application according to an embodiment of the present application;
FIG. 6(b) is a flow chart of another alternative data processing method for a web application according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an alternative data processing apparatus for a web application according to an embodiment of the present application;
FIG. 8 is a second schematic diagram of an alternative data processing apparatus for a web application according to an embodiment of the present application;
FIG. 9 is a third schematic diagram of an alternative data processing apparatus for a web application according to an embodiment of the present application;
fig. 10 is a block diagram of a computer terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, terms related to the present application are explained as follows:
MongoDB: the distributed document storage database can provide an extensible high-performance data storage solution for WEB applications (namely webpage applications). The data structure supported by the database is in BSON format, and specifically, MongoDB uses BSON as such a structure to store data and network data exchanges.
BSON: the Json-like storage format in Binary form is called Binary JSON for short, and supports embedded document objects and group objects like JSON, but BSON has some data types which JSON does not have, such as Date and BinData types, wherein the Date type is a Date type, and the BinData is a Binary type.
JSON, JavaScript Object Notation, is a lightweight data exchange format. JSON employs a text format that is completely language independent, but also uses conventions similar to the C language family (including C, C + +, C #, Java, JavaScript, Perl, Python, etc.).
The webpage application comprises the following steps: i.e., web applications, refer to application programs that are accessible via the web, i.e., programs that are executed on a user's browser.
Example 1
There is also provided, in accordance with an embodiment of the present application, a method embodiment of a data processing method for a web application, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the example of the data processing method running on the computer terminal, fig. 2 is a hardware structure block diagram of the computer terminal of the data processing method of the web application according to the embodiment of the present application. As shown in fig. 2, the computer terminal 10 may include one or more (only one shown) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 2 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 2, or have a different configuration than shown in FIG. 2.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the data processing method of the web application in the embodiment of the present application, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the data processing method of the web application. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
Under the operating environment, the application provides a data processing method of the web application as shown in fig. 3. Fig. 3 is a flowchart of an alternative data processing method for a web application according to an embodiment of the present application.
Step S302: the front end of the web application generates a first object through the received first information, wherein the data transmission format of the first object does not match the transmission format of the server of the web application, the web application may be a web application, and the web application is an application program accessible through the web, that is, a program executed on a user browser. The front end of the webpage application can be a terminal for installing the browser, and a user can input first information on the terminal; the server (or background) of the web application is used to process the first information.
Step S304: the front end of the webpage application converts the data transmission format of the first object according to the conversion information acquired in advance to obtain a second object, wherein the data transmission format of the second object is matched with the transmission format of the server;
step S306: the front end of the web application sends the second object to the server.
By adopting the above embodiment of the application, after the front end generates the first object based on the received first information, the data transmission format of the first object is converted, the data transmission format is converted into the transmission format of the server, and the second object after the conversion format is used for transmission between the front end and the background server. By the embodiment, the BSON format data can be converted into the JSON format data, the JSON format data is transmitted between the front end and the server, and the server can correctly receive and analyze the converted JSON format data, so that the problem that the BSON data cannot be transmitted between the front end and the background in the prior art is solved, and the information of the webpage application can be correctly and efficiently transmitted between the front end and the background.
The web application in the above embodiment may be a web application of a distributed document storage database MongoDB, and a user may input a query request through a front end of the web application to query data in the MongoDB.
The first object in the above embodiment may be a BSON object of the distributed document storage database MongoDB and the second object may be a JSON object that is allowed to be parsed by the server. The conversion information obtained in advance may be a conversion protocol or a communication protocol set in advance, and a type format corresponding to an object type of the BSON object is recorded in the conversion information.
The above-described embodiment of the present application will be described in detail with reference to fig. 4.
As shown in fig. 4, with the embodiment of the present application, a front end of a web page of a distributed document storage database MongoDB may interact with a background, specifically, the interaction may be performed in the following manner:
step S401: the front end of the webpage application receives first information input by a user.
The first information may be query information for querying data in a distributed document storage database MongoDB.
Step S402: the front end of the webpage application generates a BSON object based on the first information.
Step S403: and the front end of the webpage application converts the BSON object into a JSON object according to the conversion information acquired in advance.
The object type format of the BSON object may be converted into a corresponding type format according to a conversion protocol acquired in advance.
Step S404: and the front end of the webpage application sends the JSON object to a background server.
Step S405: and the background server analyzes the JSON object according to the conversion information acquired in advance.
Specifically, the background server analyzes the JSON object according to the analysis mode of the JSON object to obtain the value of the JSON object, and then converts the value of the JSON object according to the conversion information obtained in advance to obtain the first information carried in the JSON object.
Step S406: and the background server executes the background service indicated by the first information to obtain an execution result.
The background service indicated by the first information may be a service such as storage, update, or query, which is not limited in this application.
Step S407: and the background server converts the execution result into a third object according to the conversion information acquired in advance.
And the data transmission format of the third object conforms to the transmission format of the front end of the webpage application of the distributed document storage database MongoDB.
Step S408: and the background server returns the third object to the front end.
By the embodiment of the application, the communication of the data in the BSON format between the front end and the background can be realized, and the data in the BSON format can be efficiently and completely transmitted between the front end and the rear end by adopting the mode.
According to the above embodiment of the present application, the converting, by the front end of the web application, the data transmission format of the first object to obtain the second object according to the conversion information acquired in advance may include: the front end inquires type formats corresponding to the object types in conversion information acquired in advance, wherein the corresponding relation between the object types and the type formats is recorded in the conversion information acquired in advance; and under the condition that the type format corresponding to the object type is inquired, the front end converts the data transmission format of the first object into the type format to obtain a second object.
Specifically, before the front end converts the data transmission format of the first object into the type format, the method further includes: the front end judges whether the data transmission format of the object type is matched with the transmission format of the server or not; the front end converting the first object converted data format into the type format includes: and if the data transmission format of the object type does not match the transmission format of the server, converting the data transmission format of the first object into the type format.
Since BSON is a JSON-like binary-form storage format, BSON has some data types that JSON does not have, such as Date and BinData types, where Date type is Date type and BinData is binary type; similarly, BSON has some data types, such as null types, that JSON has. By the embodiment, each BSON type is distinguished by simple data redundancy without deepening a document structure, and the embodiment is suitable for transmitting any BSON data.
Specifically, as shown in table 1, the conversion information may have recorded therein: the correspondence between the object type and the conversion format.
TABLE 1
Figure GDA0001540718050000081
Figure GDA0001540718050000091
As shown in table 1, if the object type is Binary type, the format is converted into Binary data (1, asdasaaaa), where the first character string "1" in the type format represents the type of Binary data, and the second character string "asdasaaaa" represents a character string obtained by encoding Binary data BASE64, where "does not belong to a character string".
In table 1, Double represents a Double-precision floating-point type definition type, which is a variable type representing a real type variable; string represents a character String, specifically, the outermost layer is wrapped by two double quotations, wherein in order to call FastJSON analysis in the background, normal analysis can be carried out, characters need to be typed, all characters in the text are before the escape, and the program needs the escape (namely, "\\\ \ content \ is written as a character String in the program, and" \\\\ \ content \ is ""), wherein FastJSON is a tool for analyzing JSON type data.
The Undefined type in table 1 is used to indicate that the variable has not been assigned with a single equal sign when the application program is designed in the high level programming language, and the corresponding type format is: ObjectId object ID ObjectId (2184129 hj); boolean data type, the bootean variable is stored in 8-bit (1 byte) numerical form, but only True or False, and the corresponding type format is: true/false; the Date type: the date type, the corresponding type format is: isodate (xxxxxxx), where "xxxxxxx" is the date, such as 19860123; the RegExp regular expression type corresponds to the type format as follows: RegExp (pattern, attr); the JavaScript JavaScript is a dynamic type, weak type, prototype-based language, and is a built-in support type, and the corresponding type format is as follows: function () { var a ═ 123 \' + \\ "haha \ }; symbol (depredite) symbol (depredict), which corresponds to the type format: symbol (asfae), wherein the middle special character requires front-end escape, and the special characters are as follows: "\\\\\\", "'- >' and" "are included, wherein" "is not a component part of a special character. In addition, the type format corresponding to the 32-bit Integer type is: the number Int (123), wherein 123 is a specific value, the type format corresponding to the 64-bit Integer 64-bit Integer type is number Long (123), and 123 is a specific value. The Timestamp time identifier type is in a corresponding type format as follows: timestamp (2738,1), where the second parameter in the type format is a number of seconds and the first parameter is a distance from 1970.
It should be noted that the MinKey and MaxKey types of data shown in table 1 do not need to be converted exceptionally.
Table 1 above is an optional representation of the conversion information, but the present application is not limited to the representation of table 1.
Optionally, the first object is a BSON object, and converting a data transmission format of the first object to obtain the second object includes: and converting the BSON object into a corresponding JSON object to obtain a JSON character string, wherein the JSON object is a second object.
In an alternative embodiment, after the BSON object is generated, the BSON object is converted into a corresponding JSON string, front-end and background communication is performed in the form of the JSON string, and then the BSON object is parsed in the background according to a protocol.
In another implementation, the BSON object may be converted according to a corresponding type format, and after the format is converted, the JSON object after the format conversion is subjected to front-end and background communication in the form of JSON character strings.
The conversion protocol is detailed as follows:
in the process of converting the BSON format data of the front end into the JSON object:
the BSON Object { "ch": \\ "easd \ is a child document, and is wrapped by braces as with the JSON Object.
BSON Array [ a, b, c, d ] is wrapped in parentheses as is JSON Array.
Both of the above cases can be handled by FASTJSON, which is a tool for parsing JSON-type data, and this type of BSON object is not different from a regular JSON object, and when it is determined that the type format of the BSON object is consistent with the format of the JSON object that can be received and parsed by the server, format conversion may not be performed on the BSON object.
In this embodiment, if the type format of the BSON object is not consistent with the transmission format (and/or parsing format) of the server, format conversion is performed according to the conversion information obtained in advance, the data transmission format of the BSON object is converted into a corresponding type format, and is transmitted as JSON String during transmission, and the server receives the JSON String and then correspondingly parses the JSON String in the background).
Because the transmission is carried out according to the JSON String form, the outmost layer of all data types is sleeved with one layer of double quotation marks, so that the JSON analysis is carried out in the background when the background is firstly carried out, the character strings can be used as character strings for analysis, and then the JSON values can be analyzed according to the conversion information to obtain different Bson types.
According to the above embodiment of the present application, after the front end of the web application sends the second object to the server, the method further includes: and the front end of the webpage application receives a third object returned by the server, wherein the third object comprises second information obtained by the server executing the second object, and the data transmission format of the third object conforms to the transmission format of the client of the webpage application.
Optionally, the web application is a web application of a distributed document storage database.
And the data transmission format of the third object conforms to the transmission format of the front end of the webpage application of the distributed document storage database MongoDB.
Specifically, the background server may perform conversion according to the type identifier corresponding to the object type recorded in the conversion information to obtain a final data structure:
public class MongoResult{
private String type;
private Object value;
}
the result obtained by the above conversion is transmitted in the form of a character string, and for example, the data structure is converted into a character string by FastJSON and then sent to the front end.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
Example 2
According to an embodiment of the present application, there is also provided a data processing method of a web application running in a hardware block diagram, as shown in fig. 5, the method includes:
step S501: the server receives a second object sent by the front end of the webpage application, wherein the data transmission format of the second object is matched with the transmission format of the server;
step S503: and the server analyzes the second object according to the pre-acquired conversion information to obtain the first information carried by the second object.
By adopting the embodiment of the application, the server receives the second object which is sent by the front end and matched with the transmission format of the server, and after receiving the second object, the second object is analyzed to obtain the first information carried by the second object. By the embodiment, the BSON format data can be converted into the JSON format data, the JSON format data is transmitted between the front end and the server, and the server can correctly receive and analyze the converted JSON format data, so that the problem that the BSON data cannot be transmitted between the front end and the background in the prior art is solved, and the information of the webpage application can be correctly and efficiently transmitted between the front end and the background.
The web application in the above embodiment may be a web application of a distributed document storage database MongoDB, and a user may input a query request through a front end of the web application to query data in the MongoDB.
The first object in the above embodiment may be a BSON object of the distributed document storage database MongoDB and the second object may be a JSON object that is allowed to be parsed by the server. The conversion information obtained in advance may be a conversion protocol or a communication protocol set in advance, and a type format corresponding to an object type of the BSON object is recorded in the conversion information.
According to the above embodiment of the present application, after obtaining the first information carried by the second object, the method may further include: the server executes the operation indicated by the first information to obtain second information; generating a third object from the second information according to the conversion information acquired in advance, wherein the data transmission format of the third object is matched with the transmission format of the front end of the webpage application; and sending the third object to the front end of the webpage application.
Specifically, the step of analyzing, by the server, the second object according to the conversion information acquired in advance to obtain the first information carried by the second object includes: the server takes the second object as a character string and determines the value of the second object; in the conversion information acquired in advance, the server inquires the type format to which the value of the second object belongs; and under the condition that the type format to which the value of the second object belongs is inquired, the server analyzes the first information carried in the second object according to the type format.
As shown in fig. 6(a), this embodiment can be implemented by the following steps:
step S601: the front end of the webpage application receives first information input by a user.
The first information may be query information for querying data in a distributed document storage database MongoDB.
Step S602: the front end of the webpage application generates a BSON object based on the first information.
Step S603: and the front end of the webpage application converts the BSON object into a JSON object according to the conversion information acquired in advance.
The object type format of the BSON object may be converted into a corresponding type format according to a conversion protocol acquired in advance.
Step S604: and the front end of the webpage application sends the JSON object to a background server.
The steps S601 to S604 are the same as the implementation method of the corresponding steps in the embodiment 1, and are not described herein again.
Step S605: and the background server analyzes the JSON object according to the conversion information acquired in advance.
Specifically, the background server parses the received second object (JSON object) as a character string to obtain a value corresponding to the JSON object, after obtaining the value of the JSON object, finds a type format corresponding to the value of the JSON object from the pre-obtained conversion information, and parses the value according to the type format, where a specific parsing manner refers to the description of table 1 above, to obtain the first information carried in the JSON object.
Step S606: and the background server executes the background service indicated by the first information to obtain an execution result.
The background service indicated by the first information may be a service such as storage, update, or query, which is not limited in this application.
Step S607: and the background server converts the execution result (corresponding to the second information) into a third object according to the conversion information acquired in advance.
And the data transmission format of the third object conforms to the transmission format of the front end of the webpage application of the distributed document storage database MongoDB.
Specifically, the background server converts the execution result to obtain the final data structure
public class MongoResult{
private String type;
private Object value;
}
This data structure is converted to a string by FastJSON and sent to the front end.
Step S608: and the background server returns the third object to the front end.
By the embodiment of the application, the communication of the data in the BSON format between the front end and the background can be realized, and the data in the BSON format can be efficiently and completely transmitted between the front end and the rear end by adopting the mode.
Optionally, the web application in the above embodiment is a web application of a distributed document storage database.
In an alternative solution provided by the foregoing embodiment of the present application, as shown in fig. 6(b), the data processing method for a web application according to the embodiment of the present application may include the following steps:
step a: the user inputs first information on the terminal.
Step b: the terminal generates a first object through the received first information.
The terminal may be a front end of a web application. The data transmission format of the first object does not match the transmission format of the server of the web application.
Step c: and the terminal converts the data transmission format of the first object according to the conversion information acquired in advance to obtain a second object.
Wherein the data transmission format of the second object matches the transmission format of the server.
Step d: the terminal sends the second object to the server.
Step e: and the server analyzes the second object according to the pre-acquired conversion information to obtain the first information carried by the second object.
Step f: and the server executes the background service indicated by the first information to obtain an execution result.
Step h: the server converts the execution result into a third object according to the conversion information acquired in advance.
Step i: and the server returns the third object to the terminal.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Example 3
According to an embodiment of the present application, there is also provided a data processing apparatus for a web application, configured to implement the data processing method for a web application, as shown in fig. 7, where the apparatus is disposed at a front end of the web application, and includes: a receiving unit 71, a converting unit 73 and a transmitting unit 75.
The receiving unit is used for generating a first object through the received first information, wherein the data transmission format of the first object is not matched with the transmission format of the server of the webpage application;
the conversion unit is used for converting the data transmission format of the first object according to the conversion information acquired in advance to obtain a second object, wherein the data transmission format of the second object is matched with the transmission format of the server;
the sending unit is used for sending the second object to the server.
By adopting the above embodiment of the application, after the front end generates the first object based on the received first information, the data transmission format of the first object is converted, the data transmission format is converted into the transmission format of the server, and the second object after the conversion format is used for transmission between the front end and the background server. By the embodiment, the BSON format data can be converted into the JSON format data, the JSON format data is transmitted between the front end and the server, and the server can correctly receive and analyze the converted JSON format data, so that the problem that the BSON data cannot be transmitted between the front end and the background in the prior art is solved, and the information of the webpage application can be correctly and efficiently transmitted between the front end and the background.
The web application in the above embodiment may be a web application of a distributed document storage database MongoDB, and a user may input a query request through a front end of the web application to query data in the MongoDB.
The first object in the above embodiment may be a BSON object of the distributed document storage database MongoDB and the second object may be a JSON object that is allowed to be parsed by the server. The conversion information obtained in advance may be a conversion protocol or a communication protocol set in advance, and a type format corresponding to an object type of the BSON object is recorded in the conversion information.
The background server can analyze the JSON object according to the analysis mode of the JSON object to obtain the value of the JSON object, and then convert the value of the JSON object according to the pre-obtained conversion information to obtain the first information carried in the JSON object.
By the embodiment of the application, the communication of the data in the BSON format between the front end and the background can be realized, and the data in the BSON format can be efficiently and completely transmitted between the front end and the rear end by adopting the mode.
According to the above-described embodiments of the present application, the conversion unit includes: the query module is used for querying a type format corresponding to the object type in the conversion information acquired in advance, wherein the corresponding relation between the object type and the type format is recorded in the conversion information acquired in advance; and the conversion module is used for converting the data transmission format of the first object into the type format to obtain the second object under the condition that the type format corresponding to the object type is inquired.
Specifically, the apparatus further includes a judging unit 81 as shown in fig. 8 for the front end to judge whether the data transmission format of the object type matches the transmission format of the server before the front end converts the data transmission format of the first object into the type format.
The conversion module includes: and if the data transmission format of the object type does not match the transmission format of the server, converting the data transmission format of the first object into the type format.
Since BSON is a JSON-like binary-form storage format, BSON has some data types that JSON does not have, such as Date and BinData types, where Date type is Date type and BinData is binary type; similarly, BSON has some data types, such as null types, that JSON has. By the embodiment, each BSON type is distinguished by simple data redundancy without deepening a document structure, and the embodiment is suitable for transmitting any BSON data.
Optionally, the first object is a BSON object, and the conversion unit includes: and the object conversion module is used for converting the BSON object into a corresponding JSON object to obtain a JSON character string, wherein the JSON object is a second object.
In an alternative embodiment, after the BSON object is generated, the BSON object is converted into a corresponding JSON string, front-end and background communication is performed in the form of the JSON string, and then the BSON object is parsed in the background according to a protocol.
In another implementation, the BSON object may be converted according to a corresponding type format, and after the format is converted, the JSON object after the format conversion is subjected to front-end and background communication in the form of JSON character strings.
The conversion protocol is detailed as follows:
in the process of converting the BSON format data of the front end into the JSON object:
the BSON Object { "ch": \\ "easd \ is a child document, and is wrapped by braces as with the JSON Object.
BSON Array [ a, b, c, d ] is wrapped in parentheses as is JSON Array.
Both of the above cases can be handled by FASTJSON, which is a tool for parsing JSON-type data, and this type of BSON object is not different from a regular JSON object, and when it is determined that the type format of the BSON object is consistent with the format of the JSON object that can be received and parsed by the server, format conversion may not be performed on the BSON object.
In this embodiment, if the type format of the BSON object is not consistent with the transmission format (and/or parsing format) of the server, format conversion is performed according to the conversion information obtained in advance, the data transmission format of the BSON object is converted into a corresponding type format, and is transmitted as JSON String during transmission, and the server receives the JSON String and then correspondingly parses the JSON String in the background).
Because the transmission is carried out according to the JSON String form, the outmost layer of all data types is sleeved with one layer of double quotation marks, so that the JSON analysis is carried out in the background when the background is firstly carried out, the character strings can be used as character strings for analysis, and then the JSON values can be analyzed according to the conversion information to obtain different Bson types.
Specifically, the apparatus may further include: and the return unit is used for receiving a third object returned by the server by the front end of the webpage application after the second object is sent to the server by the front end of the webpage application, wherein the third object comprises second information obtained by the server executing the second object, and the data transmission format of the third object conforms to the transmission format of the client of the webpage application.
And the data transmission format of the third object conforms to the transmission format of the front end of the webpage application of the distributed document storage database MongoDB.
Specifically, the background server converts the execution result to obtain the final data structure
public class MongoResult{
private String type;
private Object value;
}
This data structure is converted to a string by FastJSON and sent to the front end.
Optionally, the web application is a web application of a distributed document storage database.
Each module provided in this embodiment is the same as the use method provided in the corresponding step of the method embodiment, and the application scenario may also be the same. Of course, it should be noted that the solution related to the modules may not be limited to the content and the scenario in the above embodiments, and the modules may be executed in a computer terminal or a mobile terminal, and may be implemented by software or hardware.
Example 4
According to an embodiment of the present application, there is also provided a data processing apparatus for a web application, configured to implement the data processing method for a web application, as shown in fig. 9, where the apparatus is disposed on a server of the web application, and includes: a receiving unit 91 and a processing unit 93.
The receiving unit is used for receiving a second object sent by the front end of the webpage application, wherein the data transmission format of the second object is matched with the transmission format of the server;
and the processing unit is used for analyzing the second object by the server according to the pre-acquired conversion information to obtain the first information carried by the second object.
By adopting the embodiment of the application, the server receives the second object which is sent by the front end and matched with the transmission format of the server, and after receiving the second object, the second object is analyzed to obtain the first information carried by the second object. By the embodiment, the BSON format data can be converted into the JSON format data, the JSON format data is transmitted between the front end and the server, and the server can correctly receive and analyze the converted JSON format data, so that the problem that the BSON data cannot be transmitted between the front end and the background in the prior art is solved, and the information of the webpage application can be correctly and efficiently transmitted between the front end and the background.
The web application in the above embodiment may be a web application of a distributed document storage database MongoDB, and a user may input a query request through a front end of the web application to query data in the MongoDB.
The first object in the above embodiment may be a BSON object of the distributed document storage database MongoDB and the second object may be a JSON object that is allowed to be parsed by the server. The conversion information obtained in advance may be a conversion protocol or a communication protocol set in advance, and a type format corresponding to an object type of the BSON object is recorded in the conversion information.
According to the above-mentioned embodiments of the present application, the apparatus may further include: the execution unit is used for executing the operation indicated by the first information after the first information carried by the second object is obtained, and obtaining second information; the generating unit is used for generating a third object from the second information according to the conversion information acquired in advance, wherein the data transmission format of the third object is matched with the transmission format of the front end of the webpage application; and the sending unit is used for sending the third object to the front end of the webpage application.
Specifically, the processing unit may include: the determining module is used for determining the value of the second object by taking the second object as a character string; the query module is used for querying the type format to which the value of the second object belongs in the pre-acquired conversion information; and the analysis unit is used for analyzing the first information carried in the second object according to the type format under the condition that the type format to which the value of the second object belongs is inquired.
Each module provided in this embodiment is the same as the use method provided in the corresponding step of the method embodiment, and the application scenario may also be the same. Of course, it should be noted that the solution related to the modules may not be limited to the content and the scenario in the above embodiments, and the modules may be executed in a computer terminal or a mobile terminal, and may be implemented by software or hardware.
Example 5
Embodiments of the present application may provide a computer terminal or a server, where the computer terminal may be any one computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced with a terminal device such as a mobile terminal.
Optionally, in this embodiment, the computer terminal may be located in at least one network device of a plurality of network devices of a computer network.
In this embodiment, the computer terminal may execute the following steps in the data processing method for the web application:
step S2: the front end of the webpage application generates a first object through the received first information, wherein the data transmission format of the first object is not matched with the transmission format of a server of the webpage application;
step S4: the front end of the webpage application converts the data transmission format of the first object according to the conversion information acquired in advance to obtain a second object, wherein the data transmission format of the second object is matched with the transmission format of the server;
step S6: the front end of the web application sends the second object to the server.
By adopting the above embodiment of the application, after the front end generates the first object based on the received first information, the data transmission format of the first object is converted, the data transmission format is converted into the transmission format of the server, and the second object after the conversion format is used for transmission between the front end and the background server. By the embodiment, the BSON format data can be converted into the JSON format data, the JSON format data is transmitted between the front end and the server, and the server can correctly receive and analyze the converted JSON format data, so that the problem that the BSON data cannot be transmitted between the front end and the background in the prior art is solved, and the information of the webpage application can be correctly and efficiently transmitted between the front end and the background.
The web application in the above embodiment may be a web application of a distributed document storage database MongoDB, and a user may input a query request through a front end of the web application to query data in the MongoDB.
In this embodiment, the computer terminal may execute the following steps in the data processing method for the web application:
step S1: the server receives a second object sent by the front end of the webpage application, wherein the data transmission format of the second object is matched with the transmission format of the server;
step S3: and the server analyzes the second object according to the pre-acquired conversion information to obtain the first information carried by the second object.
By adopting the embodiment of the application, the server receives the second object which is sent by the front end and matched with the transmission format of the server, and after receiving the second object, the second object is analyzed to obtain the first information carried by the second object. By the embodiment, the BSON format data can be converted into the JSON format data, the JSON format data is transmitted between the front end and the server, and the server can correctly receive and analyze the converted JSON format data, so that the problem that the BSON data cannot be transmitted between the front end and the background in the prior art is solved, and the information of the webpage application can be correctly and efficiently transmitted between the front end and the background.
Optionally, fig. 10 is a block diagram of a computer terminal according to an embodiment of the present application. As shown in fig. 10, the computer terminal a may include: one or more processors 1001 (only one of which is shown), memory 1003, and a transmission device 1005.
The memory 1003 may be used to store software programs and modules, such as program instructions/modules corresponding to the data processing method of the web application in the embodiment of the present application, and the processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1003, that is, implements the data processing method of the web application. The memory 1003 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1003 may further include memory located remotely from the processor, which may be connected to terminal a through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 1005 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmitting device 1005 includes a network adapter (NIC) that can be connected to a router via a network cable and other network devices to communicate with the internet or a local area network. In one example, the transmitting device 1005 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
It can be understood by those skilled in the art that the structure shown in fig. 10 is only an illustration, and the computer terminal may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 10 is a diagram illustrating a structure of the electronic device. For example, the computer terminal a may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in fig. 10, or have a different configuration than shown in fig. 10.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 6
Embodiments of the present application also provide a storage medium. Optionally, in this embodiment, the storage medium may be configured to store a program code executed by the data processing method of the web application provided in the first embodiment.
Optionally, in this embodiment, the storage medium may be located in any one of computer terminals in a computer terminal group in a computer network, or in any one of mobile terminals in a mobile terminal group.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
step S2: the front end of the webpage application generates a first object through the received first information, wherein the data transmission format of the first object is not matched with the transmission format of a server of the webpage application;
step S4: the front end of the webpage application converts the data transmission format of the first object according to the conversion information acquired in advance to obtain a second object, wherein the data transmission format of the second object is matched with the transmission format of the server;
step S6: the front end of the web application sends the second object to the server.
By adopting the above embodiment of the application, after the front end generates the first object based on the received first information, the data transmission format of the first object is converted, the data transmission format is converted into the transmission format of the server, and the second object after the conversion format is used for transmission between the front end and the background server. By the embodiment, the BSON format data can be converted into the JSON format data, the JSON format data is transmitted between the front end and the server, and the server can correctly receive and analyze the converted JSON format data, so that the problem that the BSON data cannot be transmitted between the front end and the background in the prior art is solved, and the information of the webpage application can be correctly and efficiently transmitted between the front end and the background.
The web application in the above embodiment may be a web application of a distributed document storage database MongoDB, and a user may input a query request through a front end of the web application to query data in the MongoDB.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
step S1: the server receives a second object sent by the front end of the webpage application, wherein the data transmission format of the second object is matched with the transmission format of the server;
step S3: and the server analyzes the second object according to the pre-acquired conversion information to obtain the first information carried by the second object.
By adopting the embodiment of the application, the server receives the second object which is sent by the front end and matched with the transmission format of the server, and after receiving the second object, the second object is analyzed to obtain the first information carried by the second object. By the embodiment, the BSON format data can be converted into the JSON format data, the JSON format data is transmitted between the front end and the server, and the server can correctly receive and analyze the converted JSON format data, so that the problem that the BSON data cannot be transmitted between the front end and the background in the prior art is solved, and the information of the webpage application can be correctly and efficiently transmitted between the front end and the background.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (12)

1. A data processing method for a web application is characterized by comprising the following steps:
the method comprises the steps that a front end of a webpage application generates a first object through received first information, wherein the data transmission format of the first object is not matched with the transmission format of a server of the webpage application;
the front end of the webpage application converts the data transmission format of the first object to obtain a second object according to conversion information acquired in advance, wherein the data transmission format of the second object is matched with the transmission format of the server;
the front end of the webpage application sends the second object to the server;
the webpage application is a webpage application of a distributed document storage database; the corresponding relation between the object type and the type format is recorded in the pre-acquired conversion information;
the first object is a BSON object of the distributed document storage database, and the second object is a JSON object which is allowed to be analyzed by a server; the first information is query information for querying data in the distributed document storage database.
2. The method of claim 1, wherein the converting, by the front end of the web application, the data transmission format of the first object into the second object according to the conversion information acquired in advance comprises:
the front end inquires a type format corresponding to the object type in the pre-acquired conversion information;
and under the condition that the type format corresponding to the object type is inquired, the front end converts the data transmission format of the first object into the type format to obtain the second object.
3. The method of claim 2,
before the front end converts the data transmission format of the first object to the type format, the method further comprises: the front end judges whether the data transmission format of the object type is matched with the transmission format of the server or not;
the front end converting the first object converted data format into the type format includes: and if the data transmission format of the object type is not matched with the transmission format of the server, converting the data transmission format of the first object into the type format.
4. The method of claim 1, wherein the first object is a BSON object, and wherein converting the data transmission format of the first object to obtain a second object comprises:
and converting the BSON object into a corresponding JSON object to obtain a JSON character string, wherein the JSON object is the second object.
5. The method of claim 1, wherein after the front end of the web application sends the second object to the server, the method further comprises:
and the front end of the webpage application receives a third object returned by the server, wherein the third object comprises second information obtained by the server executing the second object, and the data transmission format of the third object conforms to the transmission format of the client of the webpage application.
6. The method according to any one of claims 1 to 5, wherein the web application is a web application of a distributed document storage database.
7. A data processing method for a web application is characterized by comprising the following steps:
the method comprises the steps that a server receives a second object sent by the front end of a webpage application, wherein the data transmission format of the second object is matched with the transmission format of the server;
the server analyzes the second object according to the conversion information acquired in advance to obtain first information carried by the second object;
the webpage application is a webpage application of a distributed document storage database; the corresponding relation between the object type and the type format is recorded in the pre-acquired conversion information; the second object is a JSON object which is allowed to be analyzed by the server; the first information is query information for querying data in the distributed document storage database.
8. The method of claim 7, wherein after obtaining the first information carried by the second object, the method further comprises:
the server executes the operation indicated by the first information to obtain second information;
generating a third object from the second information according to the pre-acquired conversion information, wherein the data transmission format of the third object is matched with the transmission format of the front end of the webpage application;
and sending the third object to the front end of the webpage application.
9. The method of claim 7, wherein the server parses the second object according to the pre-obtained transformation information to obtain the first information carried by the second object includes:
the server takes the second object as a character string and determines the value of the second object;
in the conversion information acquired in advance, the server inquires the type format to which the value of the second object belongs;
and under the condition that the type format to which the value of the second object belongs is inquired, the server analyzes the first information carried in the second object according to the type format.
10. The method of claim 7 or 8, wherein the web application is a web application of a distributed document storage database.
11. A data processing apparatus for a web application, provided at a front end of the web application, comprising:
a receiving unit, configured to generate a first object through the received first information, where a data transmission format of the first object does not match a transmission format of a server of the web application;
the conversion unit is used for converting the data transmission format of the first object according to the conversion information acquired in advance to obtain a second object, wherein the data transmission format of the second object is matched with the transmission format of the server;
a sending unit, configured to send the second object to the server;
the webpage application is a webpage application of a distributed document storage database; the corresponding relation between the object type and the type format is recorded in the pre-acquired conversion information;
the first object is a BSON object of the distributed document storage database, and the second object is a JSON object which is allowed to be analyzed by a server; the first information is query information for querying data in the distributed document storage database.
12. A data processing apparatus for a web application, provided on a server for the web application, comprising:
the receiving unit is used for receiving a second object sent by the front end of the webpage application, wherein the data transmission format of the second object is matched with the transmission format of the server;
the processing unit is used for analyzing the second object by the server according to the pre-acquired conversion information to obtain first information carried by the second object;
the webpage application is a webpage application of a distributed document storage database; the corresponding relation between the object type and the type format is recorded in the pre-acquired conversion information; the second object is a JSON object which is allowed to be analyzed by the server; the first information is query information for querying data in the distributed document storage database.
CN201610128645.2A 2016-03-07 2016-03-07 Data processing method and device for webpage application Active CN107168971B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610128645.2A CN107168971B (en) 2016-03-07 2016-03-07 Data processing method and device for webpage application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610128645.2A CN107168971B (en) 2016-03-07 2016-03-07 Data processing method and device for webpage application

Publications (2)

Publication Number Publication Date
CN107168971A CN107168971A (en) 2017-09-15
CN107168971B true CN107168971B (en) 2020-10-27

Family

ID=59849756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610128645.2A Active CN107168971B (en) 2016-03-07 2016-03-07 Data processing method and device for webpage application

Country Status (1)

Country Link
CN (1) CN107168971B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107862084A (en) * 2017-11-28 2018-03-30 湖北三新文化传媒有限公司 Data managing method, device and storage medium based on web services
CN109062560B (en) * 2018-07-25 2022-05-20 北京百度网讯科技有限公司 Method and apparatus for generating information
CN110865973B (en) * 2018-08-08 2021-12-07 马上消费金融股份有限公司 Data processing method and equipment and related device
CN109214196B (en) * 2018-08-13 2022-04-19 创新先进技术有限公司 Data interaction method, device and equipment
CN111628956B (en) * 2019-02-28 2022-11-25 阿里巴巴集团控股有限公司 Format conversion method, device and system for network request transmission data
CN111726260B (en) * 2019-03-21 2023-09-08 阿里巴巴集团控股有限公司 Method, device and system for testing format conversion of network request reply information
CN113467777A (en) * 2020-03-30 2021-10-01 阿里巴巴集团控股有限公司 Path identification method, device and system
CN112256445A (en) * 2020-07-24 2021-01-22 北京沃东天骏信息技术有限公司 Data processing method, device and equipment based on application program and storage medium
CN113438187B (en) * 2021-06-23 2022-12-27 广州极飞科技股份有限公司 Data transmission method, device, transmission equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102355471A (en) * 2011-06-14 2012-02-15 上海雷腾软件有限公司 Dual-source distributed method for collection of car position data and system thereof
CN103491135A (en) * 2013-09-02 2014-01-01 用友软件股份有限公司 Device and method for conducting self-matching on data formats
US9258580B1 (en) * 2014-12-10 2016-02-09 IP-Com, LLC Dissemination of video files to mobile computing devices over a communications network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102355471A (en) * 2011-06-14 2012-02-15 上海雷腾软件有限公司 Dual-source distributed method for collection of car position data and system thereof
CN103491135A (en) * 2013-09-02 2014-01-01 用友软件股份有限公司 Device and method for conducting self-matching on data formats
US9258580B1 (en) * 2014-12-10 2016-02-09 IP-Com, LLC Dissemination of video files to mobile computing devices over a communications network

Also Published As

Publication number Publication date
CN107168971A (en) 2017-09-15

Similar Documents

Publication Publication Date Title
CN107168971B (en) Data processing method and device for webpage application
CN104468531B (en) The authorization method of sensitive data, device and system
CN105391811B (en) domain name resolution method, access method of application server and terminal thereof
CN103618794B (en) Method, terminal and the server of automated log on
CN105354314B (en) Data migration method and device
CN107636602A (en) A kind of data processing method and data processing equipment
CN111683066B (en) Heterogeneous system integration method, heterogeneous system integration device, computer equipment and storage medium
CN106572173A (en) Method, apparatus and system for updating configuration information
CN103944813A (en) Gateway and method for achieving general adaptation function
US11115913B2 (en) Wireless communication core network and method for analyzing user equipment mobility in the same
CN107451852A (en) The live promotion method and server using APP of third party in a kind of live platform
CN113422686B (en) Gateway layer authentication method, system, electronic device and storage medium
CN111224834B (en) Simulation test method, simulation test device, server and storage medium
CN105657677A (en) Short message sending method, short message gateway and service platform
CN112817602A (en) JSON format data sending and receiving method, device and medium
CN112887451A (en) Domain name resolution method and device and computer equipment
CN113467777A (en) Path identification method, device and system
CN105354270A (en) User medical data query method and distributed system
CN103079194B (en) Service adaptation method, apparatus and system
CN107104797B (en) Office encryption method and device
CN105516114B (en) Method and device for scanning vulnerability based on webpage hash value and electronic equipment
CN115208951B (en) Request processing method, request processing device, electronic equipment and computer readable storage medium
CN109040338A (en) The address IPv6 source tracing method based on space-time
CN107729345A (en) Website data processing method, device, website data processing platform and storage medium
CN108737350A (en) A kind of information processing method and client

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