CN109670328B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN109670328B
CN109670328B CN201811592926.9A CN201811592926A CN109670328B CN 109670328 B CN109670328 B CN 109670328B CN 201811592926 A CN201811592926 A CN 201811592926A CN 109670328 B CN109670328 B CN 109670328B
Authority
CN
China
Prior art keywords
data
protocol
xml file
interactive
file
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
CN201811592926.9A
Other languages
Chinese (zh)
Other versions
CN109670328A (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.)
Beijing Chengshi Wanglin Information Technology Co Ltd
Original Assignee
Beijing Chengshi Wanglin Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Chengshi Wanglin Information Technology Co Ltd filed Critical Beijing Chengshi Wanglin Information Technology Co Ltd
Priority to CN201811592926.9A priority Critical patent/CN109670328B/en
Publication of CN109670328A publication Critical patent/CN109670328A/en
Application granted granted Critical
Publication of CN109670328B publication Critical patent/CN109670328B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data

Abstract

The embodiment of the application discloses a data processing method and device, which are used for verifying interactive data between a front end and a native end, so that the correctness and the validity of the interactive data are guaranteed. The method in the embodiment of the application comprises the following steps: configuring an extensible markup language (XML) file according to an agreed protocol, wherein the agreed protocol is an interactive protocol preset by a front end and a native end; generating a Js check file according to the XML file; and verifying the interactive data between the front end and the native end according to the Js verification file.

Description

Data processing method and device
Technical Field
The present application relates to the field of computers, and in particular, to a data processing method and apparatus.
Background
Currently, most Application programs (applications) adopt Hybrid development technology, that is, the front end adopts the fifth version (abbreviated as H5) of hypertext Markup Language (HTML) and the mixing development of JavaScript and android (android) system or ios system. In the existing Hybrid framework at the android end, with the iteration of App versions, more and more Hybrid interaction protocols exist.
At present, data interaction between an App front end and a native end (namely Hybrid interaction) is directly achieved through a transparent transmission mode according to a Json protocol format agreed by the front end and the native end. The transparent transmission means that the front-end data is transmitted to a native end without any processing, and the correctness, the effectiveness and the compliance of the data do not have a reasonable specification as an automatic check standard.
Therefore, the correctness and the validity of data interaction between the front end and the native end cannot be guaranteed, so that the native end needs to perform various verification and judgment on the data, the code logic is very complicated, and even the native end is possibly abnormally crashed.
Disclosure of Invention
The embodiment of the application provides a data processing method and device, which are used for verifying interactive data between a front end and a native end, so that the correctness and the validity of the interactive data are guaranteed.
In a first aspect, an embodiment of the present application provides a data processing method, which specifically includes: the data processing device generates Extensible Markup Language (XML) according to a protocol preset by a front end and a native end; then the data processing device generates a Js check file according to the XML file; and finally, verifying the interactive data between the front end and the native end according to the Js verification file.
In the technical scheme provided by the embodiment of the application, the data processing device configures the XML file according to the agreed protocol and generates the Js check file according to the XML file, so that the interactive data between the front end and the native end can be checked, and the correctness and the validity of the interactive data received by the native end are ensured.
Optionally, the agreed protocol is a Json data protocol, and therefore, a specific manner for configuring the XML file by the data processing apparatus according to the agreed protocol may be as follows:
the data processing device configures the configuration protocol hierarchy of the XML file according to the hierarchy of the Json data protocol, wherein the hierarchies of the Json data protocol correspond to the configuration protocol hierarchies of the XML file one by one; the data processing device configures keys of the configuration protocol level of the XML file according to the keys of the Json data protocol level, and the keys of the Json data protocol level correspond to the keys of the configuration protocol level of the XML file one by one. Therefore, the XML file can be ensured to be in one-to-one correspondence with the Json data protocol, and the front end and the native end are ensured to adopt the same protocol.
Optionally, the specific process of the data processing apparatus generating the Js check file according to the XML file may be as follows: the data processing device analyzes the XML file and stores the analyzed data into a tree structure to obtain tree structure data, wherein the tree structure data comprises data hierarchy information, data key, data type, data description desc and data required attribute required of the XML file; then the data processing device generates the required protocol format of the Js check file according to the tree structure data; and finally, the data processing device generates the Js check file according to the tree structure data and the data format.
Optionally, after the data processing device verifies that the interactive data of the front end and the native end are abnormal through the Js verification file, the data processing device displays prompt information to a user to indicate that the interactive data of the user are abnormal; at the same time the data processing means will stop sending the interactive data. Therefore, the native end cannot receive abnormal data.
Optionally, when the data processing apparatus verifies the interactive data between the front end and the native end according to the Js verification file, when the Js verification file is operated, a keyPath manner is adopted in the Js verification file to traverse the parameters to be verified in the interactive data; then if the parameter to be checked exists in the interactive data, determining that the interactive data is normal; and if the interactive data does not have the data to be verified, determining that the interactive data is abnormal.
In a second aspect, an embodiment of the present application provides a data processing apparatus, where the data processing apparatus has a function of implementing the corresponding function in the method described in the first aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible implementation, the data processing apparatus includes: the configuration module is used for configuring the extensible markup language XML file according to an agreed protocol, wherein the agreed protocol is an interactive protocol preset by a front end and a native end; the generating module is used for generating a Js check file according to the XML file; and the verification module is used for verifying the interactive data between the front end and the native end according to the Js verification file.
Optionally, the agreed protocol is a Json data protocol, and the configuration module is specifically configured to configure a configuration protocol hierarchy of the XML file according to the hierarchy of the Json data protocol, where the hierarchy of the Json data protocol corresponds to the configuration protocol hierarchy of the XML file one to one; and configuring keys of the configuration protocol level of the XML file according to the keys of the Json data protocol level, wherein the keys of the Json data protocol level correspond to the keys of the configuration protocol level of the XML file one by one.
Optionally, the generating module is specifically configured to parse the XML file into a tree structure and generate tree structure data, where the tree structure data includes data hierarchy information, a data key, a data type, a data description desc, and a data required attribute required of the XML file; traversing the tree structure data to generate a data format of the Js check file; and generating the Js check file according to the data format and the tree structure data.
Optionally, the verification module is specifically configured to traverse the parameter to be verified in the interactive data in the Js verification file in a keyPath manner; if the parameter to be verified exists, determining that the interactive data is normal; and if the parameter to be checked does not exist, determining that the interactive data is abnormal.
In another possible implementation, the data processing apparatus includes: a processor and a memory, wherein the memory has a computer readable program stored therein, and the processor is configured to execute the program stored in the memory to perform the method according to the first aspect.
In one possible implementation, when the data processing apparatus is a chip, the chip includes: the system comprises a processing module and a transceiver module, wherein the processing module can be a processor, and the processor is used for configuring an extensible markup language XML file according to a protocol, and the protocol is an interactive protocol preset by a front end and a native end; generating a Js check file according to the XML file; and verifying the interactive data between the front end and the native end according to the Js verification file. The transceiver module may be, for example, an input/output interface, pin or circuit on the chip, and transmits the Js check file generated by the processor to other chips or modules coupled to the chip. The processing module can execute computer-executable instructions stored by the storage unit to support the data processing apparatus to perform the method provided by the first aspect. Alternatively, the storage unit may be a storage unit in the chip, such as a register, a cache, and the like, and the storage unit may also be a storage unit located outside the chip, such as a read-only memory (ROM) or another type of static storage device that can store static information and instructions, a Random Access Memory (RAM), and the like.
The processor mentioned in any of the above paragraphs may be a general purpose Central Processing Unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs for controlling the method of coordinating and allocating channel resources in the above paragraphs.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, where computer instructions are stored, and the computer instructions are configured to execute the method described in any possible implementation manner in the first aspect.
In a fourth aspect, embodiments of the present application provide a computer program product containing instructions, which when executed on a computer, cause the computer to perform the method according to any possible implementation manner of the first aspect.
In a fifth aspect, the present application provides a chip system comprising a processor for supporting a data processing apparatus to implement the functions referred to in the above aspects. In one possible design, the system-on-chip further includes a memory for storing program instructions and data necessary for the data processing apparatus to function as any one of the above aspects. The chip system may be formed by a chip, and may also include a chip and other discrete devices.
Drawings
Fig. 1 is a schematic diagram of a conventional data transmission structure of a front end H5 and a native end;
FIG. 2 is a schematic diagram of an embodiment of a data processing method in an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a process of generating a Js check file according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating an interactive data verification process in an embodiment of the present application;
FIG. 5 is a schematic diagram of an embodiment of a data processing apparatus according to the present embodiment;
fig. 6 is a schematic diagram of another embodiment of a data processing apparatus in the embodiment of the present application.
Detailed Description
The embodiment of the application provides a data processing method and device, which are used for verifying interactive data between a front end and a native end, so that the correctness and the validity of the interactive data are guaranteed.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically 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.
Currently, most Application programs (applications) adopt Hybrid development technology, that is, the front end adopts the fifth version (abbreviated as H5) of hypertext Markup Language (HTML) and the mixing development of JavaScript and android (android) system or ios system. In the existing Hybrid framework at the android end, with the iteration of App versions, more and more Hybrid interaction protocols exist. As shown in fig. 1, currently, data exchanged between the App front end and the native end (i.e., Hybrid interaction) is directly transmitted through a transparent transmission mode according to a Json protocol format agreed by the front end and the native end. The transparent transmission means that the front-end data is transmitted to a native end without any processing, and the correctness, the effectiveness and the compliance of the data do not have a reasonable specification as an automatic check standard. Therefore, the correctness and the validity of data interaction between the front end and the native end cannot be guaranteed, so that the native end needs to perform various verification and judgment on the data, the code logic is very complicated, and even the native end is possibly abnormally crashed.
In order to solve the problem, the embodiment of the present application provides the following technical solutions: the data processing device generates Extensible Markup Language (XML) according to a protocol preset by a front end and a native end; then the data processing device generates a Js check file according to the XML file; and finally, verifying the interactive data between the front end and the native end according to the Js verification file.
Specifically, referring to fig. 2, an embodiment of a data processing method in the present application document includes:
201. the data processing device configures the XML file according to an agreed protocol, wherein the agreed protocol is a data protocol preset by the front end and the native end.
The data processing device acquires a protocol preset by the front end and the native end, and then configures a corresponding XML file according to the protocol.
Alternatively, the agreement protocol may be the Json data protocol. The data processing apparatus may configure the corresponding XML file according to the agreed protocol as follows: the data processing device configures the configuration protocol hierarchy of the XML file according to the hierarchy of the Json data protocol, wherein the hierarchies of the Json data protocol correspond to the configuration protocol hierarchies of the XML file one by one; the data processing device configures keys of the configuration protocol level of the XML file according to the keys of the Json data protocol level, and the keys of the Json data protocol level correspond to the keys of the configuration protocol level of the XML file one by one. Assume that the agreed-upon Json data protocol is as follows:
Figure BDA0001920711140000041
the XML file may be configured as follows:
Figure BDA0001920711140000051
from the above description, the protocol levels of the XML file correspond to the Json data protocol layers one-to-one, and the key of each level of the Json corresponds to the key of each level of the XML file.
202. The data processing device generates a Js check file according to the XML file.
The data processing device analyzes the XML file and stores the analyzed data into a tree structure to obtain tree structure data, wherein the tree structure data comprises data hierarchy information, data key, data type, data description desc and data required attribute required of the XML file; then the data processing device generates the required protocol format of the Js check file according to the tree structure data; and finally, the data processing device generates the Js check file according to the tree structure data and the data format. When the data processing device generates the protocol format of the Js check file according to the tree structure data, the data processing device may pass through a traversal algorithm, and key codes of the traversal algorithm may be as follows:
Figure BDA0001920711140000052
Figure BDA0001920711140000061
203. and the data processing device verifies the interactive data between the front end and the native end according to the Js verification file.
When the data processing device verifies the interactive data between the front end and the native end according to the Js verification file, the parameters to be verified in the interactive data can be traversed in a keyPath mode in the Js verification file when the Js verification file is operated; then if the parameter to be checked exists in the interactive data, determining that the interactive data is normal; and if the interactive data does not have the data to be verified, determining that the interactive data is abnormal. For example, if the user wants to indicate that key is text, then the keyPath of key (text) is payTypeList/# 0/text; . A Js check file is a data hit that it wants to check in this way. The specific code may be as follows:
Figure BDA0001920711140000062
the specific meaning is that traversal keyPath is selected as [ "payTypeList", "# 0", "text" ]; then find the payTypeList from obj, and if found, find #0 again, at this time #0 represents the first object element of the payTypeList array, i.e., { "value": 0 "," text ": press one or two". If #0 is not found, the user is prompted for a data exception. If #0 is found, text continues to be found.
The following describes a data processing method in the embodiment of the present application with a specific flow:
the data processing method in the embodiment of the application is mainly divided into two parts: a Js verification file generation process and an interactive data verification process according to the Js verification file.
FIG. 3 shows a process of generating a Js check file: firstly, the data processing device configures an XML file according to a Json protocol; then the data processing device loads the XML file at a native end; then the data processing device analyzes the data in the XML file; then the data processing device generates a protocol format of a Js check file; and finally generating a Js check file.
FIG. 4 shows a process for verifying interactive data according to a Js check file: firstly, the data processing device loads the Js check file; then the data processing device reads the Json protocol data and calls Js check file to check data; and if the data is legal, transmitting the data to a native terminal, and if the data is illegal, prompting a user.
With reference to fig. 5, the data processing method in the embodiment of the present application is described above, and a data processing apparatus in the embodiment of the present application is described below, where an embodiment of the data processing apparatus in the embodiment of the present application includes:
a configuration module 501, configured to configure an XML file according to an agreed protocol, where the agreed protocol is an interactive protocol preset by a front end and a native end;
a generating module 502, configured to generate a Js check file according to the XML file;
and the checking module 503 is configured to check the interactive data between the front end and the native end according to the Js check file.
Optionally, the agreed protocol is a Json data protocol, and the configuration module 501 is specifically configured to configure a configuration protocol hierarchy of the XML file according to the hierarchy of the Json data protocol, where the hierarchy of the Json data protocol corresponds to the configuration protocol hierarchy of the XML file one to one; and configuring keys of the configuration protocol level of the XML file according to the keys of the Json data protocol level, wherein the keys of the Json data protocol level correspond to the keys of the configuration protocol level of the XML file one by one.
Optionally, the generating module 502 is specifically configured to parse the XML file into a tree structure and generate tree structure data, where the tree structure data includes data hierarchy information, a data key, a data type, a data description desc, and a data required attribute required of the XML file; traversing the tree structure data to generate a data format of the Js check file; and generating the Js check file according to the data format and the tree structure data.
Optionally, the data processing apparatus further includes a prompt module 504, configured to display a prompt message and stop sending the interactive data if the interactive data is abnormal.
Optionally, the verification module 503 is specifically configured to traverse the parameter to be verified in the interactive data in the Js verification file in a keyPath manner;
if the parameter to be verified exists, determining that the interactive data is normal;
and if the parameter to be checked does not exist, determining that the interactive data is abnormal.
Referring to fig. 6, in another possible schematic structural diagram of a data processing apparatus in the embodiment of the present application, the apparatus 600 may include: a processor 602, a computer-readable storage medium/memory 603, a transceiver 604, an input device 605 and an output device 606, and a bus 601. Wherein the processor, transceiver, computer readable storage medium, etc. are connected by a bus. The embodiments of the present application do not limit the specific connection medium between the above components.
In one example, the processor 602 configures an XML file according to a protocol defined by an interaction protocol preset by a front end and a native end; generating a Js check file according to the XML file; and verifying the interactive data between the front end and the native end according to the Js verification file.
In yet another example, processor 602 may run an operating system that controls functions between various devices and appliances.
The processor 602 may implement corresponding steps in any one of the embodiments of fig. 2 to fig. 4, which are not described herein in detail.
It is understood that fig. 6 only shows a simplified design of the data processing device, and in practical applications, the data processing device may comprise any number of transceivers, processors, memories, etc., and all data processing devices that can implement the present application are within the scope of the present application.
The processor 602 involved in the apparatus 600 may be a general-purpose processor, such as a general-purpose Central Processing Unit (CPU), a Network Processor (NP), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program according to the present application. But also a Digital Signal Processor (DSP), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The controller/processor can also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others. Processors typically perform logical and arithmetic operations based on program instructions stored within memory.
The bus 601 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
The computer-readable storage medium/memory 603 referred to above may also hold an operating system and other application programs. In particular, the program may include program code including computer operating instructions. More specifically, the memory may be a read-only memory (ROM), other types of static storage devices that may store static information and instructions, a Random Access Memory (RAM), other types of dynamic storage devices that may store information and instructions, a disk memory, and so forth. The memory 603 may be a combination of the above memory types. And the computer-readable storage medium/memory described above may be in the processor, may be external to the processor, or distributed across multiple entities including the processor or processing circuitry. The computer-readable storage medium/memory described above may be embodied in a computer program product. By way of example, a computer program product may include a computer-readable medium in packaging material.
Alternatively, embodiments of the present application also provide a general-purpose processing system, such as that commonly referred to as a chip, including one or more microprocessors that provide processor functionality; and an external memory providing at least a portion of the storage medium, all connected together with other supporting circuitry through an external bus architecture. The memory stores instructions that, when executed by the processor, cause the processor to perform some or all of the steps of the data processing apparatus in the data processing methods of the embodiments described in fig. 2-4 and/or other processes for the techniques described herein.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied in hardware or in software instructions executed by a processor. The software instructions may consist of corresponding software modules that may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC. Additionally, the ASIC may reside in user equipment. Of course, the processor and the storage medium may reside as discrete components in user equipment.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or 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, devices or units, and may be in an electrical, mechanical 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 removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (8)

1. A data processing method, comprising:
configuring an extensible markup language (XML) file according to an agreed protocol, wherein the agreed protocol is an interactive protocol preset by a front end and a native end; the agreed protocol is a Json data protocol, and configuring the extensible markup language XML file according to the agreed protocol comprises the following steps: configuring a configuration protocol hierarchy of the XML file according to the hierarchy of the Json data protocol, wherein the hierarchy of the Json data protocol corresponds to the configuration protocol hierarchy of the XML file one by one; configuring keys of a configuration protocol level of the XML file according to the keys of the Json data protocol level, wherein the keys of the Json data protocol level correspond to the keys of the configuration protocol level of the XML file one by one;
generating a Js check file according to the XML file; the generating of the Js check file according to the XML file includes: analyzing the XML file to a tree structure and generating tree structure data, wherein the tree structure data comprises data hierarchy information, data key, data type, data description desc and data necessary attribute required of the XML file; traversing the tree structure data to generate a data format of the Js check file; generating the Js check file according to the data format and the tree structure data;
and verifying the interactive data between the front end and the native end according to the Js verification file.
2. The method of claim 1, further comprising:
and if the interactive data is abnormal, displaying prompt information and stopping sending the interactive data.
3. The method according to claim 1, wherein the verifying the interaction data between the front end and the native end according to the Js check file comprises:
traversing the parameters to be verified in the interactive data in the Js verification file in a keyPath mode;
if the parameter to be verified exists, determining that the interactive data is normal;
and if the parameter to be checked does not exist, determining that the interactive data is abnormal.
4. A data processing apparatus, comprising:
the configuration module is used for configuring the extensible markup language XML file according to an agreed protocol, wherein the agreed protocol is an interactive protocol preset by a front end and a native end; the configuration module is specifically configured to configure a configuration protocol hierarchy of the XML file according to the hierarchy of the Json data protocol, and the hierarchies of the Json data protocol correspond to the configuration protocol hierarchies of the XML file one by one; configuring keys of a configuration protocol level of the XML file according to the keys of the Json data protocol level, wherein the keys of the Json data protocol level correspond to the keys of the configuration protocol level of the XML file one by one;
the generating module is used for generating a Js check file according to the XML file; the generating module is specifically configured to parse the XML file into a tree structure and generate tree structure data, where the tree structure data includes data hierarchy information, a data key, a data type, a data description desc, and a data required attribute required of the XML file; traversing the tree structure data to generate a data format of the Js check file; generating the Js check file according to the data format and the tree structure data;
and the verification module is used for verifying the interactive data between the front end and the native end according to the Js verification file.
5. The device according to claim 4, wherein the data processing device further comprises a prompt module, configured to display a prompt message and stop sending the interactive data if the interactive data is abnormal.
6. The apparatus according to claim 4, wherein the checking module is specifically configured to traverse parameters to be checked in the interactive data in the Js check file in a keyPath manner;
if the parameter to be verified exists, determining that the interactive data is normal;
and if the parameter to be checked does not exist, determining that the interactive data is abnormal.
7. A data processing apparatus comprising a processor and a memory, wherein a computer readable program is stored in the memory, and wherein the processor is configured to execute the program in the memory to perform the method of any of claims 1 to 3.
8. A computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any of claims 1 to 3.
CN201811592926.9A 2018-12-25 2018-12-25 Data processing method and device Active CN109670328B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811592926.9A CN109670328B (en) 2018-12-25 2018-12-25 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811592926.9A CN109670328B (en) 2018-12-25 2018-12-25 Data processing method and device

Publications (2)

Publication Number Publication Date
CN109670328A CN109670328A (en) 2019-04-23
CN109670328B true CN109670328B (en) 2022-04-26

Family

ID=66147236

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811592926.9A Active CN109670328B (en) 2018-12-25 2018-12-25 Data processing method and device

Country Status (1)

Country Link
CN (1) CN109670328B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737636B (en) * 2019-09-24 2022-07-22 厦门信息集团大数据运营有限公司 Data import method, device and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360937A (en) * 2014-10-21 2015-02-18 福建富士通信息软件有限公司 Intelligent parameter checking device
CN105426164A (en) * 2014-09-04 2016-03-23 北大方正集团有限公司 Data checking method, browser and server
CN105550016A (en) * 2015-12-09 2016-05-04 国云科技股份有限公司 React-native based method for quickly realizing login of mobile terminal user
CN108462749A (en) * 2018-03-22 2018-08-28 中国人民解放军战略支援部队信息工程大学 A kind of Web application processing methods, apparatus and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105700925B (en) * 2016-01-13 2019-02-19 深圳市华讯方舟软件信息有限公司 A kind of interface implementing method and device of APP
CN106897220A (en) * 2017-02-20 2017-06-27 南京国电南自电网自动化有限公司 A kind of method of calibration of the System Object Model based on XML
US10817490B2 (en) * 2017-04-28 2020-10-27 Microsoft Technology Licensing, Llc Parser for schema-free data exchange format

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426164A (en) * 2014-09-04 2016-03-23 北大方正集团有限公司 Data checking method, browser and server
CN104360937A (en) * 2014-10-21 2015-02-18 福建富士通信息软件有限公司 Intelligent parameter checking device
CN105550016A (en) * 2015-12-09 2016-05-04 国云科技股份有限公司 React-native based method for quickly realizing login of mobile terminal user
CN108462749A (en) * 2018-03-22 2018-08-28 中国人民解放军战略支援部队信息工程大学 A kind of Web application processing methods, apparatus and system

Also Published As

Publication number Publication date
CN109670328A (en) 2019-04-23

Similar Documents

Publication Publication Date Title
CN109683953B (en) Method and device for processing configuration file based on visual interface
US10831826B2 (en) Validation of schema and schema conformance verification
WO2017084345A1 (en) Method and device for form verification
CN111143087B (en) Interface calling method, device, storage medium and server
CN107357732B (en) User terminal and software development kit access state detection device and method
US11301357B1 (en) Method to check application programming interface correctness in software
CN108763071A (en) A kind of webpage test method and terminal device
CN111061464A (en) Analysis code generation method, device, equipment and storage medium
CN105164691A (en) Optimizing test data payload selection for testing computer software applications using computer networks
CN105404574B (en) Smart card and mobile terminal consistency test method and device
CN113268260A (en) Routing method and device for web front end
US9715372B2 (en) Executable guidance experiences based on implicitly generated guidance models
CN109670328B (en) Data processing method and device
US9866571B2 (en) Securing execution of customer-supplied network page generation code
US20170235943A1 (en) Application Access Control Method and Apparatus
US9098623B2 (en) Static analysis of validator routines
CN110569038A (en) Random verification parameter design method and device, computer equipment and storage medium
CN113572826B (en) Device information binding method and system and electronic device
CN112631949B (en) Debugging method and device, computer equipment and storage medium
CN110988661B (en) FPGA prototype verification development board time division analysis system, method, medium and terminal
CN109491896B (en) WeChat applet form verification method of education system and electronic equipment
CN111027073B (en) Vulnerability detection method, device, equipment and storage medium
US10803219B1 (en) Method and system for combined formal static analysis of a design code
CN113569184A (en) Configurable data calculation method, device, equipment and computer readable medium
CN112287643A (en) Message monitoring method, device, equipment and computer readable storage medium

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