WO2019227702A1 - Data processing method and apparatus, and computer device and storage medium - Google Patents

Data processing method and apparatus, and computer device and storage medium Download PDF

Info

Publication number
WO2019227702A1
WO2019227702A1 PCT/CN2018/101879 CN2018101879W WO2019227702A1 WO 2019227702 A1 WO2019227702 A1 WO 2019227702A1 CN 2018101879 W CN2018101879 W CN 2018101879W WO 2019227702 A1 WO2019227702 A1 WO 2019227702A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
background data
interface
background
url
Prior art date
Application number
PCT/CN2018/101879
Other languages
French (fr)
Chinese (zh)
Inventor
方小伟
张川
李泳章
黄度新
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019227702A1 publication Critical patent/WO2019227702A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the present application relates to the field of computer technology, and in particular, to a data processing method, apparatus, computer equipment, and storage medium.
  • the embodiments of the present application provide a data processing method, device, computer equipment, and storage medium, which can greatly simplify background data processing logic and improve background data processing efficiency.
  • an embodiment of the present application provides a data processing method.
  • the method includes: establishing a data transmission channel of a data processing interface and a URL interface in advance; obtaining background data in the URL interface according to the data transmission channel; Set a decoupling rule to decouple the background data in the URL interface; and process the decoupled background data according to a preset processing rule to simplify the background data.
  • an embodiment of the present application provides a data processing apparatus, the apparatus includes: a establishing unit configured to establish a data transmission channel of a data processing interface and a URL interface in advance; and a first obtaining unit configured to according to the data
  • the transmission channel acquires background data in the URL interface; a decoupling unit for decoupling the background data in the URL interface according to a preset decoupling rule; a processing unit for decoupling the decomposed data according to a preset processing rule Coupled background data for processing to simplify the background data.
  • an embodiment of the present application further provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program To implement the data processing method described above.
  • an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs may be processed by one or more processors. Executed to implement the data processing method described above.
  • the data processing method described in the embodiments of the present application can greatly simplify background data processing logic and improve background data processing efficiency.
  • FIG. 1 is a schematic flowchart of a data processing method according to an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a data processing method according to an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a data processing method according to another embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a data processing method according to another embodiment of the present application.
  • FIG. 5 is a schematic block diagram of a data processing apparatus according to an embodiment of the present application.
  • FIG. 6 is another schematic block diagram of a data processing apparatus according to an embodiment of the present application.
  • FIG. 7 is another schematic block diagram of a data processing apparatus according to an embodiment of the present application.
  • FIG. 8 is another schematic block diagram of a data processing apparatus according to an embodiment of the present application.
  • FIG. 9 is another schematic block diagram of a data processing apparatus according to an embodiment of the present application.
  • FIG. 10 is a schematic structural composition diagram of a computer device according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a data processing method according to an embodiment of the present application.
  • the method can be run in terminals such as smart phones (such as Android phones, IOS phones, etc.), tablet computers, notebook computers, and smart devices.
  • the data processing method described in the embodiments of the present application can greatly reduce the time for writing test code and improve the test efficiency.
  • FIG. 1 is a schematic flowchart of a data processing method according to an embodiment of the present application. As shown in FIG. 1, the method includes steps S101 to S104.
  • the data transmission channel refers to a transmission channel of a URL interface and a data processing interface.
  • the URL interface acquires background data
  • the background data is transmitted to the data processing interface in real time through the data transmission channel.
  • the configuration path refers to a path for obtaining background data.
  • the step S101 includes steps S201 to S204.
  • the URL interface object refers to an object created in the URL interface.
  • the URL interface object is used by the URL interface to obtain background data and establish a transmission channel with the data processing interface object in step S202. For example, Create a URL interface object in the URL interface, name it URL, and set the configuration path of the URL interface object to 'group'. '0'. 'Personal'.
  • the attribute value corresponding to the configuration path of the URL interface object is the URL interface. Get the URL of the background data, such as migrate / getGroupCust.
  • the data processing interface object refers to an object created in a data processing interface, and the data processing interface object is used to establish a transmission channel between the data processing interface and the URL interface object in step S202 and pass the transmission The channel gets background data.
  • a data processing interface object is created in the data processing interface and named dataRules.
  • S203 Set the URL interface object and the data processing interface object to the same path.
  • setting the URL interface object and the data processing interface object to the same path that is, setting the configuration path of the URL interface object to be consistent with the configuration path of the data processing interface object, for example, in the URL interface Create a URL interface object, name it URL, and set the configuration path of the URL interface object to 'group'. '0'. 'Personal', create a data processing interface object in the data processing interface, name it dataRules, and set the The configuration path of the data processing interface object is 'group'. '0'.
  • the attribute value set by the configuration path of the URL interface object is the URL address of the URL interface to obtain background data
  • the configuration path of the data processing interface object The set attribute value can be defined by the user.
  • the attribute value corresponding to the configuration path of the data processing interface object is different from the attribute value set by the configuration path of the URL interface object.
  • the configuration path of the URL interface object is set to be consistent with the configuration path of the data processing interface object.
  • the configuration path in the interface object is the same as the URL interface.
  • the data processing interface can obtain the background data obtained by the URL interface object in real time through the data processing interface object. In this way, the URL interface and the data processing interface are established by configuring the same configuration path. Data transmission channel.
  • S102 Acquire background data in the URL interface according to the data transmission channel.
  • the URL interface is used to URL background to obtain background data.
  • the background data obtained by the URL interface is transmitted to the data processing interface in real time through the data transmission channel, where the acquisition instruction may be a user ’s click
  • the instruction formed by the operation may specifically set a corresponding virtual control on the confirmation page for the user to determine.
  • the user generates the acquisition instruction by operating the set virtual control, and the acquisition instruction triggers the URL interface to start a program for acquiring background data. .
  • S103 Decouple the background data in the URL interface according to a preset decoupling rule.
  • the background data is decoupled by using a preset decoupling rule in the data processing interface.
  • the step of decoupling the background data according to the preset decoupling rule specifically includes: determining a corresponding value of the background data.
  • the obtained background data field names are 'intUsersNum', 'crnNewUserNum', and the configuration object according to the field name specifically uses the obtained data field name as a key in the configuration object Name key value, each key name corresponds to a key value, and each key value corresponds to a data field name.
  • the configuration object For example, if the data field of the background code is named 'intUsersNum', 'crnNewUserNum', we can name the configuration object as dataKey, And define the two key names of the object daaKey as 'num0' and 'num1', and use the preset assignment rules to convert the data word
  • the method for assigning a key name to a segment name can be 'key name': 'data field name'.
  • the two key names in the JSON object are assigned using the data field name of the background code as the key value, and get 'num0': ' intUsersNum ',' num1 ':' crnNewUserNum ', by assigning a data field name as a key value to the key name, the operation of configuring the configuration object with the data field name is completed, and the background is decoupled from the configuration object
  • the data is specifically to obtain the background data corresponding to the background data field name as decoupling data according to the configuration object and complete the decoupling of the background data.
  • the data field name corresponding to the background data can be weakened
  • the coupling relationship between the corresponding data field names used by the front-end logic code If the corresponding data field names in the background data are changed, many of the front-end logic code uses the data field names of the background data.
  • the data field name of the data is changed drastically; the method of obtaining decoupled data is to edit They invoke the command data.intUsersNum to obtain background data decoupling data with data corresponding to the field name intUsersNum.
  • the preset processing rule refers to converting background data into data in a format required by a user according to a data processing requirement, thereby achieving the purpose of simplifying the background data; a specific processing rule may be determined by a user It is self-defined, and there is no limitation here. For example, we often simplify the background data of hundreds of millions, and get the simplified data that is divided by 10,000 or divided by hundreds of millions, and the decimal places after the percentage point are displayed.
  • simplified method To: define the data processing object in the data processing interface, and define the data processing rules in the data processing object.
  • a background data is 1836000000, and the data format we need is 184 million. Then we need to divide the data by 10000000, and take the decimal point. The last two bits, get the decoupled background data 1836000000 by calling the function getRuleData () in the data processing object, divide the decoupled background data by 100 million by defining the background data processing array ['yi', 2], and keep two Decimal places, and finally get the required simplified data of 184 million; for example, the background data is 1836000000, we need The data format is 18.36 million, so we need to divide the data by 10000, and then take the decimal place, and then get the decoupled background data 1836000000 by calling the function getRuleData () in the data processing object, and define the background data processing array [' wan ', 1] divides the decoupled background data by 10,000 and keeps one decimal place, and finally obtains the required simplified data of 1.836 billion.
  • the embodiments of the present application establish a data transmission channel of a data processing interface and a URL interface in advance; obtain background data in the URL interface according to the data transmission channel; Background data is decoupled; the decoupled background data is processed according to a preset processing rule, so as to achieve the purpose of simplifying the background data.
  • the embodiments of the present application can greatly simplify the processing logic of background data and improve the processing efficiency of background data.
  • FIG. 3 is a schematic flowchart of a data processing method according to an embodiment of the present application.
  • the method can be run in terminals such as smart phones (such as Android phones, IOS phones, etc.), tablet computers, notebook computers, and smart devices.
  • the method includes steps S301 to S305.
  • the data transmission channel refers to a transmission channel of a URL interface and a data processing interface.
  • the URL interface acquires background data
  • the background data is transmitted to the data processing interface in real time through the data transmission channel.
  • the data processing interface has the same rules for obtaining data.
  • the configuration path refers to the path for obtaining background data.
  • the URL interface acquires the background data according to a preset configuration path.
  • the configuration path is set in a URL interface object created by the URL interface, and the attribute value of the configuration path is the URL address where the URL interface obtains background data.
  • the attribute value of the configuration path of the URL interface is After adding the URL address used to obtain the background data, the background data is obtained through the URL address configured by the configuration path.
  • S304 Decouple the background data in the URL interface according to a preset decoupling rule.
  • the background data is decoupled by using a preset decoupling rule in the data processing interface.
  • the step of decoupling the background data according to the preset decoupling rule specifically includes: determining a corresponding value of the background data.
  • the name when stored in a field format for example, the obtained background data field names are 'intUsersNum', 'crnNewUserNum', and the configuration object according to the field name is specifically the obtained data field name as a key name in the configuration object Key value, each key name corresponds to a key value, each key value corresponds to a data field name, for example, if the data field name of the backend code is 'intUsersNum', 'crnNewUserNum', we can name the configuration object as dataKey and define The two key names of the object dataKey are 'num0' and 'num1', and the data field names are set using preset assignment rules
  • the method for assigning a key name can be 'key name': '
  • the front-end logic code uses the data field names of the background data.
  • the data field names are changed drastically; the method of obtaining decoupled data is to write Data.intUsersNum order to obtain background data decouple the data field names with data corresponding intUsersNum.
  • S305 Process the decoupled background data according to a preset processing rule to simplify the background data.
  • the preset processing rule refers to converting background data into data in a format required by a user according to a data processing requirement.
  • a specific processing rule may be defined by a user and is not limited herein. For example, We often simplify the background data of hundreds of millions, and get the simplified data that is divided by 10,000 or divided by a few decimal places and displayed by percentage points.
  • the optional and simplified method is to define the data processing object in the data processing interface.
  • the decoupled background data 1836000000 is obtained by calling the function getRuleData ().
  • the decoupled background Divide the data by 10,000, and keep one decimal place, and finally get the required simplified data of 1.836 billion.
  • FIG. 4 is a schematic flowchart of a data processing method according to an embodiment of the present application.
  • the method can be run in terminals such as smart phones (such as Android phones, IOS phones, etc.), tablet computers, notebook computers, and smart devices.
  • the method includes steps S401 to S407.
  • the data transmission channel refers to a transmission channel of a URL interface and a data processing interface.
  • the URL interface acquires background data
  • the background data is transmitted to the data processing interface in real time through the data transmission channel.
  • the configuration path refers to a path for obtaining background data.
  • the obtaining instruction obtains background data through the URL address in the URL interface.
  • the acquisition instruction may be an instruction formed by a user's click operation. Specifically, a corresponding virtual control may be set on a confirmation page for the user to determine. The user generates the acquisition instruction by operating the set virtual control, and the URL is triggered by the acquisition instruction.
  • the interface starts a program that obtains background data.
  • the background data is decoupled by using a preset decoupling rule in the data processing interface.
  • the step of decoupling the background data according to the preset decoupling rule specifically includes: : Determining a data field name corresponding to the background data; creating a configuration object according to the data field name; decoupling the background data according to the configuration object; specifically, determining the data field name corresponding to the background data, the data
  • the field name refers to the name when the background data is stored in a field format.
  • the obtained background data field names are 'intUsersNum', 'crnNewUserNum', and the configuration object according to the field name is specifically the obtained data field name
  • each key name corresponds to a key value
  • each key value corresponds to a data field name.
  • the data field of the background code is named 'intUsersNum', 'crnNewUserNum'
  • the method of assigning a data field name to a key name by a value rule can be 'key name': 'data field name'
  • the two key names in the JSON object are assigned by using the data field name of the background code as the key value, and get ' num0 ':' intUsersNum ',' num1 ':' crnNewUserNum '
  • the operation of configuring the configuration object for the data field name is completed by assigning the data field name as a key value to the key name, and the solution is based on the configuration object solution
  • the coupling of the background data is specifically to obtain the background data corresponding to the background data field name as the decoupling data according to
  • the background data correspondence can be weakened
  • the coupling relationship between the data field name and the front-end logic code uses the corresponding data field name. If the corresponding data field name in the background data is changed, then the front-end logic code uses the data field name of the background data in many places, and Will not be significantly modified by changing the data field name of the background data; get decoupled data
  • the method is to write the calling command data.intUsersNum to get the decoupled data corresponding to the data field name intUsersNum in the background data.
  • the preset processing rule refers to converting background data into data in a format required by a user according to a data processing requirement, and a specific processing rule may be defined by a user.
  • a specific processing rule may be defined by a user.
  • the optional, simplified method is:
  • the data processing interface defines the data processing object, and defines the data processing rules in the data processing object. For example, a background data is 1836000000, and the data format we need is 184 million.
  • a characteristic parameter of the processed background data In the embodiment of the present application, a characteristic parameter of the background data processed by a preset processing rule is obtained, and the characteristic parameter is used to distinguish the background data to be processed from the processed background data.
  • the characteristic parameter may be Background data are simplified digital units, such as "thousands", “ten thousand”, and so on.
  • S406 Determine whether the characteristic parameter matches a predetermined data format parameter.
  • the data format of the characteristic parameter after the background data is processed may be specified.
  • the background data is 1836000000, and the data format we need is 183.6 million.
  • the data format of the background data after processing is divided in advance by 10,000, and the digital unit after processing is "10,000".
  • the data format of the processed characteristic parameters does not meet the pre-defined Data format, you can judge that the background data processed is invalid.
  • the characteristic parameter matches a predetermined data format parameter, determine that the processed background data is valid.
  • the data format of the processed characteristic parameters conforms to a predetermined data format, it is determined that the processed background data is valid.
  • an embodiment of the present application further provides a data processing apparatus.
  • the apparatus 100 includes: a establishing unit 101, a first obtaining unit 102, a decoupling unit 103, and a processing unit 104.
  • the establishing unit 101 is configured to establish a data transmission channel of a data processing interface and a URL interface in advance.
  • the transmission unit 102 is configured to acquire background data in the URL interface according to the data transmission channel.
  • the decoupling unit 103 is configured to decouple the background data in the URL interface according to a preset decoupling rule.
  • the processing unit 104 is configured to process the decoupled background data according to a preset processing rule to simplify the background data.
  • the embodiments of the present application establish a data transmission channel of a data processing interface and a URL interface in advance; obtain background data in the URL interface according to the data transmission channel; Background data is decoupled; the decoupled background data is processed according to a preset processing rule, so as to achieve the purpose of simplifying the background data.
  • the embodiments of the present application can greatly simplify the processing logic of background data and improve the processing efficiency of background data.
  • the establishment unit 101 includes a first creation unit 1011 for creating a URL interface object.
  • the second creating unit 1012 is configured to create a data processing interface object.
  • a setting unit 1013 is configured to set the URL interface object and the data processing interface object to the same path.
  • a establishing subunit 1014 is configured to establish the data transmission channel according to the same path that is set.
  • the decoupling unit 103 includes a determining unit 1031 configured to determine a data field name corresponding to the background data.
  • the third creating unit 1032 is configured to create a configuration object according to the data field name.
  • a decoupling subunit 1033 is configured to decouple the background data according to the configuration object.
  • an embodiment of the present application further provides a data processing apparatus.
  • the apparatus 200 includes: a establishing unit 201, a second obtaining unit 202, a first obtaining unit 203, and a decoupling unit 204.
  • ⁇ Processing unit 205 ⁇ Processing unit 205.
  • the establishing unit 201 is configured to establish a data transmission channel of a data processing interface and a URL interface in advance.
  • the second obtaining unit 202 is configured for the URL interface to obtain the background data according to a preset configuration path.
  • the first obtaining unit 203 is configured to obtain background data in the URL interface according to the data transmission channel.
  • the decoupling unit 204 is configured to decouple the background data in the URL interface according to a preset decoupling rule.
  • the processing unit 205 is configured to process the decoupled background data according to a preset processing rule to simplify the background data.
  • an embodiment of the present application further provides a data processing device.
  • the device 300 includes: a establishing unit 301, a first obtaining unit 302, a decoupling unit 303, a processing unit 304, a first Three acquisition units 305, a judgment unit 306, and a judgment unit 307.
  • the establishing unit 301 is configured to establish a data transmission channel of a data processing interface and a URL interface in advance.
  • the first obtaining unit 302 is configured to obtain background data in the URL interface according to the data transmission channel.
  • the decoupling unit 303 is configured to decouple the background data in the URL interface according to a preset decoupling rule.
  • the processing unit 304 is configured to process the decoupled background data according to a preset processing rule to simplify the background data.
  • the third obtaining unit 305 is configured to obtain a characteristic parameter of the processed background data.
  • the judging unit 306 is configured to judge whether the characteristic parameter matches a predetermined data format parameter.
  • a determining unit 307 is configured to determine that the processed background data is valid if the characteristic parameter matches a predetermined data format parameter.
  • the above-mentioned data processing device corresponds to the above-mentioned data processing method in a one-to-one manner, and its specific principles and processes are the same as the methods described in the above embodiments, and will not be described again.
  • the above data processing apparatus may be implemented in the form of a computer program, and the computer program may be run on a computer device as shown in FIG. 10.
  • FIG. 10 is a schematic structural diagram of a computer device of the present application.
  • the device may be a terminal or a server.
  • the terminal may be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device.
  • the server can be an independent server or a server cluster consisting of multiple servers.
  • the computer device 500 includes a processor 502, a non-volatile storage medium 503, an internal memory 504, and a network interface 505 connected through a system bus 501.
  • the non-volatile storage medium 503 of the computer device 500 can store an operating system 5031 and a computer program 5032.
  • the processor 502 can execute a data processing method.
  • the processor 502 of the computer device 500 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
  • the internal memory 504 provides an environment for running the computer program 5032 in the non-volatile storage medium 503, and when the computer program is executed by the processor, the processor 502 can execute a data processing method.
  • the network interface 505 of the computer device 500 is used for network communication, such as sending assigned tasks.
  • the processor 502 executes the computer program to implement the following operations: establishing a data transmission channel of a data processing interface and a URL interface in advance; obtaining background data in the URL interface according to the data transmission channel; Decoupling rules decouple background data in the URL interface; and process decoupled background data according to a preset processing rule to simplify the background data.
  • the pre-established data transmission channel of the data processing interface and the URL interface includes: creating a URL interface object; creating a data processing interface object; setting the URL interface object and the data processing interface object to the same path ; Establishing the data transmission channel according to the same path that is set.
  • the URL interface acquires the background data according to a preset configuration path.
  • decoupling the background data in the URL interface according to a preset decoupling rule includes: determining a data field name corresponding to the background data; creating a configuration object according to the data field name; and according to the The configuration object decouples the background data.
  • the processor 502 executes the computer program, the following operations are further implemented: obtaining characteristic parameters of the processed background data; determining whether the characteristic parameters match a predetermined data format parameter; if all The characteristic parameter matches a predetermined data format parameter, and it is determined that the processed background data is valid.
  • the embodiment of the computer device shown in FIG. 10 does not constitute a limitation on the specific configuration of the computer device.
  • the computer device may include more or fewer components than shown in the figure. Either some parts are combined or different parts are arranged.
  • the computer device only includes a memory and a processor. In such an embodiment, the structure and function of the memory and the processor are consistent with the embodiment shown in FIG. 10, and details are not described herein again.
  • This application provides a computer-readable storage medium.
  • the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the functions described in this application. Data processing methods.
  • the foregoing storage medium of the present application includes: various media that can store program code, such as a magnetic disk, an optical disc, and a read-only memory (Read-Only Memory, ROM).
  • program code such as a magnetic disk, an optical disc, and a read-only memory (Read-Only Memory, ROM).
  • the units in all embodiments of the present application may be implemented by a general integrated circuit, such as a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit, ASIC).
  • a CPU Central Processing Unit
  • ASIC Application Specific Integrated Circuit
  • Units in the data processing apparatus in the embodiments of the present application may be combined, divided, and deleted according to actual needs.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

Disclosed are a data processing method and apparatus, and a computer device and a storage medium. The method comprises: pre-establishing a data transmission channel between a data processing interface and a URL interface; acquiring, according to the data transmission channel, background data in the URL interface; decoupling the background data in the URL interface according to a pre-set decoupling rule; and processing the decoupled background data according to a pre-set processing rule, so as to simplify the background data.

Description

数据处理方法、装置、计算机设备以及存储介质Data processing method, device, computer equipment and storage medium
本申请要求于2018年5月30日提交中国专利局、申请号为CN 201810539634.2、申请名称为“数据处理方法、装置、计算机设备以及存储介”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority from a Chinese patent application filed with the Chinese Patent Office on May 30, 2018, with application number CN201810539634.2, and with the application name "Data Processing Method, Device, Computer Equipment, and Storage Agent", the entire contents of which are hereby incorporated by reference Incorporated in this application.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种数据处理方法、装置、计算机设备以及存储介质。The present application relates to the field of computer technology, and in particular, to a data processing method, apparatus, computer equipment, and storage medium.
背景技术Background technique
根据项目需求,经常会需要处理后台返回的数据,比如除以万,除以亿,取百分点几位小数。这些处理一般都是在代码里进行直接处理,或者调用相应的处理方法。若使用这类代码对后台返回的数据进行处理,需要去找到相应的代码,或者对于那些同一种业务处理方式,只是数据取万或者取亿这类的细微差距,在代码里做分支判断来分别处理,这样便会增加代码量;若不使用这类代码对后台返回的数据进行处理,对于后台中的万级或者亿级的数据,因为量级过于庞大,将导致用户操作效率低下,浪费大量时间。According to the needs of the project, it is often necessary to process the data returned by the background, such as dividing by 10,000, dividing by 100 million, taking a few decimal places. These processes are usually directly processed in the code, or the corresponding processing method is called. If you use this type of code to process the data returned in the background, you need to find the corresponding code, or for those same business processing methods, only the slight difference of taking tens of millions or tens of millions of data, make branch judgments in the code to distinguish If you do not use this type of code to process the data returned in the background, for the 10,000 or 100 million data in the background, because the magnitude is too large, it will lead to inefficient user operations and a lot of waste. time.
发明内容Summary of the Invention
有鉴于此,本申请实施例提供一种数据处理方法、装置、计算机设备以及存储介质,能够在很大程度上简化后台数据的处理逻辑,并提高后台数据的处理效率。In view of this, the embodiments of the present application provide a data processing method, device, computer equipment, and storage medium, which can greatly simplify background data processing logic and improve background data processing efficiency.
一方面,本申请实施例提供了一种数据处理方法,该方法包括:预先建立数据处理接口与URL接口的数据传输通道;根据所述数据传输通道获取所述URL接口中的后台数据;根据预设解耦规则对所述URL接口中的后台数据进行解耦;根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。In one aspect, an embodiment of the present application provides a data processing method. The method includes: establishing a data transmission channel of a data processing interface and a URL interface in advance; obtaining background data in the URL interface according to the data transmission channel; Set a decoupling rule to decouple the background data in the URL interface; and process the decoupled background data according to a preset processing rule to simplify the background data.
另一方面,本申请实施例提供了一种数据处理装置,所述装置包括:建立单元,用于预先建立数据处理接口与URL接口的数据传输通道;第一获取单元,用于根据所述数据传输通道获取所述URL接口中的后台数据;解耦单元,用于 根据预设解耦规则对所述URL接口中的后台数据进行解耦;处理单元,用于根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。On the other hand, an embodiment of the present application provides a data processing apparatus, the apparatus includes: a establishing unit configured to establish a data transmission channel of a data processing interface and a URL interface in advance; and a first obtaining unit configured to according to the data The transmission channel acquires background data in the URL interface; a decoupling unit for decoupling the background data in the URL interface according to a preset decoupling rule; a processing unit for decoupling the decomposed data according to a preset processing rule Coupled background data for processing to simplify the background data.
又一方面,本申请实施例还提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上所述的数据处理方法。In another aspect, an embodiment of the present application further provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program To implement the data processing method described above.
再一方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行,以实现如上所述的数据处理方法。In another aspect, an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs may be processed by one or more processors. Executed to implement the data processing method described above.
本申请实施例所述的数据处理方法,能够在很大程度上简化后台数据的处理逻辑,并提高后台数据的处理效率。The data processing method described in the embodiments of the present application can greatly simplify background data processing logic and improve background data processing efficiency.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the drawings used in the description of the embodiments are briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application. For ordinary technicians, other drawings can be obtained based on these drawings without paying creative labor.
图1是本申请实施例提供的一种数据处理方法的示意流程图;FIG. 1 is a schematic flowchart of a data processing method according to an embodiment of the present application; FIG.
图2是本申请实施例提供的一种数据处理方法的示意流程图;2 is a schematic flowchart of a data processing method according to an embodiment of the present application;
图3是本申请另一实施例提供的一种数据处理方法的示意流程图;3 is a schematic flowchart of a data processing method according to another embodiment of the present application;
图4是本申请另一实施例提供的一种数据处理方法的示意流程图;4 is a schematic flowchart of a data processing method according to another embodiment of the present application;
图5是本申请实施例提供的一种数据处理装置的示意性框图;5 is a schematic block diagram of a data processing apparatus according to an embodiment of the present application;
图6是本申请实施例提供的一种数据处理装置的另一示意性框图;6 is another schematic block diagram of a data processing apparatus according to an embodiment of the present application;
图7是本申请实施例提供的一种数据处理装置的另一示意性框图;7 is another schematic block diagram of a data processing apparatus according to an embodiment of the present application;
图8是本申请实施例提供的一种数据处理装置的另一示意性框图;8 is another schematic block diagram of a data processing apparatus according to an embodiment of the present application;
图9是本申请实施例提供的一种数据处理装置的另一示意性框图FIG. 9 is another schematic block diagram of a data processing apparatus according to an embodiment of the present application
图10是本申请实施例提供的一种计算机设备的结构组成示意图。FIG. 10 is a schematic structural composition diagram of a computer device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部 的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In the following, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of them. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
请参阅图1,图1为本申请实施例提供的一种数据处理方法的示意流程图。该方法可以运行在智能手机(如Android手机、IOS手机等)、平板电脑、笔记本电脑以及智能设备等终端中。本申请实施例所述的数据处理方法,在很大程度上可以减少编写测试代码的时间,提高测试效率。图1是本申请实施例提供的数据处理方法的示意流程图。如图1所示,该方法包括步骤S101~S104。Please refer to FIG. 1, which is a schematic flowchart of a data processing method according to an embodiment of the present application. The method can be run in terminals such as smart phones (such as Android phones, IOS phones, etc.), tablet computers, notebook computers, and smart devices. The data processing method described in the embodiments of the present application can greatly reduce the time for writing test code and improve the test efficiency. FIG. 1 is a schematic flowchart of a data processing method according to an embodiment of the present application. As shown in FIG. 1, the method includes steps S101 to S104.
S101,预先建立数据处理接口与URL接口的数据传输通道。在本申请实施例中,所述数据传输通道指的是URL接口与数据处理接口的传输通道,当URL接口获取后台数据时,通过该数据传输通道将后台数据实时传输给数据处理接口,具体地,可以通过分别在URL接口、数据处理接口中设置接口对象,并设置URL接口的接口对象与数据处理接口的接口对象的配置路径相同,从而保证URL接口与数据处理接口获取数据的规则一致,该配置路径指的是用于获取后台数据的路径,当URL接口的接口对象与数据处理接口的接口对象获取数据的规则一致时,便建立了URL接口与数据处理接口的传输通道。S101. Establish a data transmission channel of a data processing interface and a URL interface in advance. In the embodiment of the present application, the data transmission channel refers to a transmission channel of a URL interface and a data processing interface. When the URL interface acquires background data, the background data is transmitted to the data processing interface in real time through the data transmission channel. Specifically, You can set interface objects in the URL interface and the data processing interface, and set the configuration path of the interface object of the URL interface and the interface object of the data processing interface to be the same. This ensures that the URL interface and the data processing interface have the same rules for obtaining data. The configuration path refers to a path for obtaining background data. When the interface object of the URL interface and the data processing interface interface object obtain the same data acquisition rules, a transmission channel of the URL interface and the data processing interface is established.
进一步地,如图2所示,所述步骤S101包括步骤S201~S204。Further, as shown in FIG. 2, the step S101 includes steps S201 to S204.
S201,创建URL接口对象。在本申请实施例中,该URL接口对象指的是在URL接口中创建的对象,该URL接口对象用于URL接口获取后台数据,并与步骤S202中的数据处理接口对象建立传输通道,例如,在URL接口中创建URL接口对象,命名为URL,并设置该URL接口对象的配置路径为’group’.’0’.’personal’,该URL接口对象的配置路径所对应的属性值为URL接口获取后台数据的URL地址,该URL地址如migrate/getGroupCust。S201. Create a URL interface object. In the embodiment of the present application, the URL interface object refers to an object created in the URL interface. The URL interface object is used by the URL interface to obtain background data and establish a transmission channel with the data processing interface object in step S202. For example, Create a URL interface object in the URL interface, name it URL, and set the configuration path of the URL interface object to 'group'. '0'. 'Personal'. The attribute value corresponding to the configuration path of the URL interface object is the URL interface. Get the URL of the background data, such as migrate / getGroupCust.
S202,创建数据处理接口对象。在本申请实施例中,该数据处理接口对象指的是在数据处理接口中创建的对象,该数据处理接口对象用于数据处理接口与步骤S202中的URL接口对象建立传输通道,并通过该传输通道得到后台数据,例如,在数据处理接口中创建数据处理接口对象,命名为dataRules。S202: Create a data processing interface object. In the embodiment of the present application, the data processing interface object refers to an object created in a data processing interface, and the data processing interface object is used to establish a transmission channel between the data processing interface and the URL interface object in step S202 and pass the transmission The channel gets background data. For example, a data processing interface object is created in the data processing interface and named dataRules.
S203,设置所述URL接口对象与所述数据处理接口对象为相同路径。在本申请实施例中,设置所述URL接口对象与所述数据处理接口对象为相同路径,即为设置URL接口对象的配置路径与所述数据处理接口对象的配置路径一致,例如,在URL接口中创建URL接口对象,命名为URL,并设置该URL接口对 象的配置路径为’group’.’0’.’personal’,在数据处理接口中创建数据处理接口对象,命名为dataRules,并设置该数据处理接口对象的配置路径为’group’.’0’.’personal’,其中,URL接口对象的配置路径所设置的属性值为URL接口获取后台数据的URL地址,数据处理接口对象的配置路径所设置的属性值可以由用户自行定义,在本实施例中,为了区分理解,数据处理接口对象的配置路径所对应的属性值与URL接口对象的配置路径所设置的属性值不相同。S203. Set the URL interface object and the data processing interface object to the same path. In the embodiment of the present application, setting the URL interface object and the data processing interface object to the same path, that is, setting the configuration path of the URL interface object to be consistent with the configuration path of the data processing interface object, for example, in the URL interface Create a URL interface object, name it URL, and set the configuration path of the URL interface object to 'group'. '0'. 'Personal', create a data processing interface object in the data processing interface, name it dataRules, and set the The configuration path of the data processing interface object is 'group'. '0'. 'Personal', where the attribute value set by the configuration path of the URL interface object is the URL address of the URL interface to obtain background data, and the configuration path of the data processing interface object The set attribute value can be defined by the user. In this embodiment, in order to distinguish and understand, the attribute value corresponding to the configuration path of the data processing interface object is different from the attribute value set by the configuration path of the URL interface object.
S204,根据所设置的相同路径建立所述数据传输通道。在本申请实施例中,通过设置URL接口对象的配置路径与所述数据处理接口对象的配置路径一致,当URL接口通过URL接口对象的URL地址获取到后台数据时,由于数据处理接口的数据处理接口对象中的配置路径与URL接口相同,数据处理接口可以实时的通过该数据处理接口对象获得URL接口对象所获取的后台数据,这样便通过配置相同的配置路径的方式建立URL接口与数据处理接口的数据传输通道。S204. Establish the data transmission channel according to the same set path. In the embodiment of the present application, the configuration path of the URL interface object is set to be consistent with the configuration path of the data processing interface object. When the URL interface obtains background data through the URL address of the URL interface object, due to the data processing of the data processing interface The configuration path in the interface object is the same as the URL interface. The data processing interface can obtain the background data obtained by the URL interface object in real time through the data processing interface object. In this way, the URL interface and the data processing interface are established by configuring the same configuration path. Data transmission channel.
S102,根据所述数据传输通道获取所述URL接口中的后台数据。在本申请实施例中,通过设置URL接口对象的配置路径与所述数据处理接口对象的配置路径一致,建立URL接口与数据处理接口的数据传输通道后,若接收到获取指令,通过URL接口中的URL地址获取后台数据,当URL接口中的URL地址获取后台数据时,通过所述数据传输通道将URL接口所获取的后台数据实时传输至数据处理接口,其中,该获取指令可以是用户的点击操作所形成的指令,具体地,可以在供用户确定的确认页面上设置相应的虚拟控件,用户通过操作所设置的虚拟控件产生该获取指令,通过该获取指令触发URL接口启动获取后台数据的程序。S102. Acquire background data in the URL interface according to the data transmission channel. In the embodiment of the present application, by setting the configuration path of the URL interface object to be the same as the configuration path of the data processing interface object, after establishing a data transmission channel of the URL interface and the data processing interface, if an acquisition instruction is received, the URL interface is used to URL background to obtain background data. When the URL address in the URL interface obtains background data, the background data obtained by the URL interface is transmitted to the data processing interface in real time through the data transmission channel, where the acquisition instruction may be a user ’s click The instruction formed by the operation may specifically set a corresponding virtual control on the confirmation page for the user to determine. The user generates the acquisition instruction by operating the set virtual control, and the acquisition instruction triggers the URL interface to start a program for acquiring background data. .
S103,根据预设解耦规则对所述URL接口中的后台数据进行解耦。在本申请实施例中,利用数据处理接口中的预设解耦规则对后台数据进行解耦,所述根据预设解耦规则解耦所述后台数据的步骤具体包括:确定后台数据所对应的数据字段名;根据所述数据字段名创建配置对象;根据所述配置对象解耦所述后台数据;具体地,所述确定后台数据所对应的数据字段名,该数据字段名指的是后台数据以字段格式存储时的名称,例如,所获取的后台数据字段名为’intUsersNum’、’crnNewUserNum’,所述根据所述字段名配置对象具体为将所获取的数据字段名作为配置对象中的键名的键值,每一个键名对应一个键值,每一个键值对应一个数据字段名,例如,假如后台代码的数据字段名 为’intUsersNum’、’crnNewUserNum’,我们可以命名配置对象为dataKey,并定义对象daaKey的两个键名分别为’num0’、’num1’,利用预设赋值规则将数据字段名赋予键名的方法可以为’键名’:’数据字段名’,最后通过后台代码的数据字段名作为键值对JSON对象中的两个键名进行赋值,并得到’num0’:’intUsersNum’、’num1’:’crnNewUserNum’,通过将数据字段名作为键值赋予键名即完成了所述数据字段名配置所述配置对象的操作,所述根据所述配置对象解耦所述后台数据具体为根据配置对象获取与后台数据字段名相对应的后台数据作为解耦数据,并完成后台数据的解耦,通过设置配置对象对后台数据进行解耦,能够减弱后台数据对应的数据字段名与前端逻辑代码使用对应的数据字段名之间的耦合关系,假如后台数据中对应的数据字段名改变了,那么前端逻辑代码中很多使用了后台数据的数据字段名的地方,并不会因为后台数据的数据字段名的改变而进行大幅度地修改;获取解耦数据的方法为通过编写调用命令data.intUsersNum以得到后台数据中与数据字段名intUsersNum相对应的解耦数据。S103. Decouple the background data in the URL interface according to a preset decoupling rule. In the embodiment of the present application, the background data is decoupled by using a preset decoupling rule in the data processing interface. The step of decoupling the background data according to the preset decoupling rule specifically includes: determining a corresponding value of the background data. A data field name; creating a configuration object according to the data field name; decoupling the background data according to the configuration object; specifically, determining a data field name corresponding to the background data, the data field name refers to background data The name when stored in a field format, for example, the obtained background data field names are 'intUsersNum', 'crnNewUserNum', and the configuration object according to the field name specifically uses the obtained data field name as a key in the configuration object Name key value, each key name corresponds to a key value, and each key value corresponds to a data field name. For example, if the data field of the background code is named 'intUsersNum', 'crnNewUserNum', we can name the configuration object as dataKey, And define the two key names of the object daaKey as 'num0' and 'num1', and use the preset assignment rules to convert the data word The method for assigning a key name to a segment name can be 'key name': 'data field name'. Finally, the two key names in the JSON object are assigned using the data field name of the background code as the key value, and get 'num0': ' intUsersNum ',' num1 ':' crnNewUserNum ', by assigning a data field name as a key value to the key name, the operation of configuring the configuration object with the data field name is completed, and the background is decoupled from the configuration object The data is specifically to obtain the background data corresponding to the background data field name as decoupling data according to the configuration object and complete the decoupling of the background data. By setting the configuration object to decouple the background data, the data field name corresponding to the background data can be weakened The coupling relationship between the corresponding data field names used by the front-end logic code. If the corresponding data field names in the background data are changed, many of the front-end logic code uses the data field names of the background data. The data field name of the data is changed drastically; the method of obtaining decoupled data is to edit They invoke the command data.intUsersNum to obtain background data decoupling data with data corresponding to the field name intUsersNum.
S104,根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。在本申请实施例中,所述预设处理规则指的是根据数据处理的需要将后台数据转换成用户所需格式的数据,从而达到简化所述后台数据的目的;具体的处理规则可以由用户自行定义,在此不作限制,例如,我们经常会简化上亿的后台数据,并得到除以万或者除以亿,并取百分点后几位小数的简化数据进行显示,可选的,简化的方法为:在数据处理接口定义数据处理对象,在数据处理对象中定义数据处理规则,如一条后台数据为1836000000,我们需要的数据格式是1.84亿,那我们需要把数据除以10000000,又要取小数点后两位,在数据处理对象中通过调用函数getRuleData()得到解耦的后台数据1836000000,通过定义后台数据处理数组[‘yi’,2]将解耦的后台数据除以一亿,并保留两位小数,最后得到所需要的简化数据1.84亿;再例如,后台数据为1836000000,我们需要的数据格式是183600万,那我们需要把数据除以10000,又要取小数点后1位,在数据处理对象中通过调用函数getRuleData()得到解耦的后台数据1836000000,通过定义后台数据处理数组[‘wan’,1]将解耦的后台数据除以一万,并保留一位小数,最后得到所需要的简化数据183600.0万。S104. Process the decoupled background data according to a preset processing rule to simplify the background data. In the embodiment of the present application, the preset processing rule refers to converting background data into data in a format required by a user according to a data processing requirement, thereby achieving the purpose of simplifying the background data; a specific processing rule may be determined by a user It is self-defined, and there is no limitation here. For example, we often simplify the background data of hundreds of millions, and get the simplified data that is divided by 10,000 or divided by hundreds of millions, and the decimal places after the percentage point are displayed. Optional, simplified method To: define the data processing object in the data processing interface, and define the data processing rules in the data processing object. For example, a background data is 1836000000, and the data format we need is 184 million. Then we need to divide the data by 10000000, and take the decimal point. The last two bits, get the decoupled background data 1836000000 by calling the function getRuleData () in the data processing object, divide the decoupled background data by 100 million by defining the background data processing array ['yi', 2], and keep two Decimal places, and finally get the required simplified data of 184 million; for example, the background data is 1836000000, we need The data format is 18.36 million, so we need to divide the data by 10000, and then take the decimal place, and then get the decoupled background data 1836000000 by calling the function getRuleData () in the data processing object, and define the background data processing array [' wan ', 1] divides the decoupled background data by 10,000 and keeps one decimal place, and finally obtains the required simplified data of 1.836 billion.
由以上可见,本申请实施例通过预先建立数据处理接口与URL接口的数据 传输通道;根据所述数据传输通道获取所述URL接口中的后台数据;根据预设解耦规则对所述URL接口中的后台数据进行解耦;根据预设处理规则对已解耦的后台数据进行处理,从而达到简化所述后台数据的目的。本申请实施例能够在很大程度上简化后台数据的处理逻辑,并提高后台数据的处理效率。As can be seen from the above, the embodiments of the present application establish a data transmission channel of a data processing interface and a URL interface in advance; obtain background data in the URL interface according to the data transmission channel; Background data is decoupled; the decoupled background data is processed according to a preset processing rule, so as to achieve the purpose of simplifying the background data. The embodiments of the present application can greatly simplify the processing logic of background data and improve the processing efficiency of background data.
请参阅图3,图3是本申请实施例提供的一种数据处理方法的示意流程图。该方法可以运行在智能手机(如Android手机、IOS手机等)、平板电脑、笔记本电脑以及智能设备等终端中。如图3所示,该方法包括步骤S301~S305。Please refer to FIG. 3, which is a schematic flowchart of a data processing method according to an embodiment of the present application. The method can be run in terminals such as smart phones (such as Android phones, IOS phones, etc.), tablet computers, notebook computers, and smart devices. As shown in FIG. 3, the method includes steps S301 to S305.
S301,预先建立数据处理接口与URL接口的数据传输通道。在本申请实施例中,所述数据传输通道指的是URL接口与数据处理接口的传输通道,当URL接口获取后台数据时,通过该数据传输通道将后台数据实时传输给数据处理接口,具体地,可以通过分别在URL接口、数据处理接口中设置接口对象,并设置URL接口的接口对象与数据处理接口的接口对象的配置路径相同,从而保证URL(Uniform Resource Locator,统一资源定位符)接口与数据处理接口获取数据的规则一致,该配置路径指的是用于获取后台数据的路径,当URL接口的接口对象与数据处理接口的接口对象获取数据的规则一致时,便建立了URL接口与数据处理接口的传输通道。S301. Establish a data transmission channel of a data processing interface and a URL interface in advance. In the embodiment of the present application, the data transmission channel refers to a transmission channel of a URL interface and a data processing interface. When the URL interface acquires background data, the background data is transmitted to the data processing interface in real time through the data transmission channel. Specifically, You can set the interface object in the URL interface and the data processing interface respectively, and set the configuration path of the interface object of the URL interface and the interface object of the data processing interface to be the same, so as to ensure that the URL (Uniform Resource Locator, Uniform Resource Locator) interface and The data processing interface has the same rules for obtaining data. The configuration path refers to the path for obtaining background data. When the interface object of the URL interface and the data processing interface have the same rules for obtaining data, the URL interface and data are established The transmission channel of the processing interface.
S302,所述URL接口根据预先设置的配置路径获取所述后台数据。在本申请实施例中,所述URL接口所创建的URL接口对象中设置所述配置路径,所述配置路径的属性值为URL接口获取后台数据的URL地址,当URL接口的配置路径的属性值中添加了用于获取后台数据的URL地址后,通过该配置路径所配置的URL地址获取后台数据。S302. The URL interface acquires the background data according to a preset configuration path. In the embodiment of the present application, the configuration path is set in a URL interface object created by the URL interface, and the attribute value of the configuration path is the URL address where the URL interface obtains background data. When the attribute value of the configuration path of the URL interface is After adding the URL address used to obtain the background data, the background data is obtained through the URL address configured by the configuration path.
S303,根据所述数据传输通道获取所述URL接口中的后台数据。在本申请实施例中,通过设置URL接口对象的配置路径与所述数据处理接口对象的配置路径一致,建立URL接口与数据处理接口的数据传输通道后,若接收到获取指令,通过URL接口中的URL地址获取后台数据,当URL接口中的URL地址获取后台数据时,通过所述数据传输通道将URL接口所获取的后台数据实时传输至数据处理接口,其中,该获取指令可以是用户的点击操作所形成的指令,具体地,可以在供用户确定的确认页面上设置相应的虚拟控件,用户通过操作所设置的虚拟控件产生该获取指令,通过该获取指令触发URL接口启动获取后台数据的程序。S303. Acquire background data in the URL interface according to the data transmission channel. In the embodiment of the present application, by setting the configuration path of the URL interface object to be the same as the configuration path of the data processing interface object, after establishing a data transmission channel of the URL interface and the data processing interface, if an acquisition instruction is received, the URL interface is passed through the URL interface. URL background to obtain background data. When the URL address in the URL interface obtains background data, the background data obtained by the URL interface is transmitted to the data processing interface in real time through the data transmission channel, where the acquisition instruction may be a user ’s click The instruction formed by the operation may specifically set a corresponding virtual control on the confirmation page for the user to determine. The user generates the acquisition instruction by operating the set virtual control, and the acquisition instruction triggers the URL interface to start a program for acquiring background data. .
S304,根据预设解耦规则对所述URL接口中的后台数据进行解耦。在本申请实施例中,利用数据处理接口中的预设解耦规则对后台数据进行解耦,所述根据预设解耦规则解耦所述后台数据的步骤具体包括:确定后台数据所对应的数据字段名;根据所述数据字段名创建配置对象;根据所述配置对象解耦所述后台数据;具体地,所述确定后台数据所对应的数据字段名,该数据字段名指的是后台数据以字段格式存储时的名称,例如所获取的后台数据字段名为’intUsersNum’、’crnNewUserNum’,所述根据所述字段名配置对象具体为将所获取的数据字段名作为配置对象中键名的键值,每一个键名对应一个键值,每一个键值对应一个数据字段名,例如,假如后台代码的数据字段名为’intUsersNum’、’crnNewUserNum’,我们可以命名配置对象为dataKey,并定义对象dataKey的两个键名分别为’num0’、’num1’,利用预设赋值规则将数据字段名赋予键名的方法可以为’键名’:’数据字段名’,最后通过后台代码的数据字段名作为键值对JSON对象中的两个键名进行赋值,并得到’num0’:’intUsersNum’、’num1’:’crnNewUserNum’,通过将数据字段名作为键值赋予键名即完成了所述数据字段名配置所述配置对象的操作,所述根据所述配置对象解耦所述后台数据具体为根据配置对象获取与后台数据字段名相对应的后台数据作为解耦数据,并完成后台数据的解耦,通过设置配置对象对后台数据进行解耦,能够减弱后台数据对应的数据字段名与前端逻辑代码使用对应的数据字段名之间的耦合关系,假如后台数据中对应的数据字段名改变了,那么前端逻辑代码中很多使用了后台数据的数据字段名的地方,并不会因为后台数据的数据字段名的改变而进行大幅度地修改;获取解耦数据的方法为通过编写调用命令data.intUsersNum以得到后台数据中与数据字段名intUsersNum相对应的解耦数据。S304. Decouple the background data in the URL interface according to a preset decoupling rule. In the embodiment of the present application, the background data is decoupled by using a preset decoupling rule in the data processing interface. The step of decoupling the background data according to the preset decoupling rule specifically includes: determining a corresponding value of the background data. A data field name; creating a configuration object according to the data field name; decoupling the background data according to the configuration object; specifically, determining a data field name corresponding to the background data, the data field name refers to background data The name when stored in a field format, for example, the obtained background data field names are 'intUsersNum', 'crnNewUserNum', and the configuration object according to the field name is specifically the obtained data field name as a key name in the configuration object Key value, each key name corresponds to a key value, each key value corresponds to a data field name, for example, if the data field name of the backend code is 'intUsersNum', 'crnNewUserNum', we can name the configuration object as dataKey and define The two key names of the object dataKey are 'num0' and 'num1', and the data field names are set using preset assignment rules The method for assigning a key name can be 'key name': 'data field name', and finally assign two key names in the JSON object by using the data field name of the background code as the key value, and get 'num0': 'intUsersNum' , 'Num1': 'crnNewUserNum', by assigning the data field name as a key value to the key name, the operation of configuring the configuration object with the data field name is completed, and the decoupling of the background data according to the configuration object is specific In order to obtain the background data corresponding to the background data field name as the decoupling data according to the configuration object and complete the decoupling of the background data, by setting the configuration object to decouple the background data, the data field name and the front end corresponding to the background data can be weakened The logic code uses the coupling relationship between the corresponding data field names. If the corresponding data field names in the background data are changed, then many of the front-end logic code uses the data field names of the background data. The data field names are changed drastically; the method of obtaining decoupled data is to write Data.intUsersNum order to obtain background data decouple the data field names with data corresponding intUsersNum.
S305,根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。在本申请实施例中,所述预设处理规则指的是根据数据处理的需要将后台数据转换成用户所需格式的数据,具体的处理规则可以由用户自行定义,在此不作限制,例如,我们经常会简化上亿的后台数据,并得到除以万或者除以亿,并取百分点后几位小数的简化数据进行显示,可选的,简化的方法为:在数据处理接口定义数据处理对象,在数据处理对象中定义数据处理规则,如一条后台数据为1836000000,我们需要的数据格式是1.84亿,那我们需要把数据 除以10000000,又要取小数点后两位,在数据处理对象中通过调用函数getRuleData()得到解耦的后台数据1836000000,通过定义后台数据处理数组[‘yi’,2]将解耦的后台数据除以一亿,并保留两位小数,最后得到所需要的简化数据1.84亿;再例如,后台数据为1836000000,我们需要的数据格式是183600万,那我们需要把数据除以10000,又要取小数点后1位,在数据处理对象中通过调用函数getRuleData()得到解耦的后台数据1836000000,通过定义后台数据处理数组[‘wan’,1]将解耦的后台数据除以一万,并保留一位小数,最后得到所需要的简化数据183600.0万。S305: Process the decoupled background data according to a preset processing rule to simplify the background data. In the embodiment of the present application, the preset processing rule refers to converting background data into data in a format required by a user according to a data processing requirement. A specific processing rule may be defined by a user and is not limited herein. For example, We often simplify the background data of hundreds of millions, and get the simplified data that is divided by 10,000 or divided by a few decimal places and displayed by percentage points. The optional and simplified method is to define the data processing object in the data processing interface. , Define the data processing rules in the data processing object, such as a background data is 1836000000, we need the data format is 184 million, then we need to divide the data by 10000000, and then take the two decimal places, pass in the data processing object Call the function getRuleData () to get the decoupled background data of 1836000000. By defining the background data processing array ['yi', 2], divide the decoupled background data by 100 million, and retain two decimal places, and finally obtain the required simplified data. 184 million; for another example, the background data is 1836000000, the data format we need is 183.6 million, then we need to put According to the division by 10000, one digit after the decimal point must be taken. In the data processing object, the decoupled background data 1836000000 is obtained by calling the function getRuleData (). By defining the background data processing array ['wan', 1], the decoupled background Divide the data by 10,000, and keep one decimal place, and finally get the required simplified data of 1.836 billion.
请参阅图4,图4是本申请实施例提供的一种数据处理方法的示意流程图。该方法可以运行在智能手机(如Android手机、IOS手机等)、平板电脑、笔记本电脑以及智能设备等终端中。如图4所示,该方法包括步骤S401~S407。Please refer to FIG. 4, which is a schematic flowchart of a data processing method according to an embodiment of the present application. The method can be run in terminals such as smart phones (such as Android phones, IOS phones, etc.), tablet computers, notebook computers, and smart devices. As shown in FIG. 4, the method includes steps S401 to S407.
S401,预先建立数据处理接口与URL接口的数据传输通道。在本申请实施例中,所述数据传输通道指的是URL接口与数据处理接口的传输通道,当URL接口获取后台数据时,通过该数据传输通道将后台数据实时传输给数据处理接口,具体地,可以通过分别在URL接口、数据处理接口中设置接口对象,并设置URL接口的接口对象与数据处理接口的接口对象的配置路径相同,从而保证URL接口与数据处理接口获取数据的规则一致,该配置路径指的是用于获取后台数据的路径,当URL接口的接口对象与数据处理接口的接口对象获取数据的规则一致时,便建立了URL接口与数据处理接口的传输通道。S401. Establish a data transmission channel of a data processing interface and a URL interface in advance. In the embodiment of the present application, the data transmission channel refers to a transmission channel of a URL interface and a data processing interface. When the URL interface acquires background data, the background data is transmitted to the data processing interface in real time through the data transmission channel. Specifically, You can set interface objects in the URL interface and the data processing interface, and set the configuration path of the interface object of the URL interface and the interface object of the data processing interface to be the same. This ensures that the URL interface and the data processing interface have the same rules for obtaining data. The configuration path refers to a path for obtaining background data. When the interface object of the URL interface and the data processing interface interface object obtain the same data acquisition rules, a transmission channel of the URL interface and the data processing interface is established.
S402,根据所述数据传输通道获取所述URL接口中的后台数据。在本申请实施例中,在本申请实施例中,通过设置URL接口对象的配置路径与所述数据处理接口对象的配置路径一致,建立URL接口与数据处理接口的数据传输通道后,若接收到获取指令,通过URL接口中的URL地址获取后台数据,当URL接口中的URL地址获取后台数据时,通过所述数据传输通道将URL接口所获取的后台数据实时传输至数据处理接口,其中,该获取指令可以是用户的点击操作所形成的指令,具体地,可以在供用户确定的确认页面上设置相应的虚拟控件,用户通过操作所设置的虚拟控件产生该获取指令,通过该获取指令触发URL接口启动获取后台数据的程序。S402. Acquire background data in the URL interface according to the data transmission channel. In the embodiment of the present application, in the embodiment of the present application, by setting the configuration path of the URL interface object to be consistent with the configuration path of the data processing interface object, after establishing a data transmission channel of the URL interface and the data processing interface, if a data transmission channel is received, The obtaining instruction obtains background data through the URL address in the URL interface. When the background address is obtained through the URL address in the URL interface, the background data obtained through the URL interface is transmitted to the data processing interface in real time through the data transmission channel. The acquisition instruction may be an instruction formed by a user's click operation. Specifically, a corresponding virtual control may be set on a confirmation page for the user to determine. The user generates the acquisition instruction by operating the set virtual control, and the URL is triggered by the acquisition instruction. The interface starts a program that obtains background data.
S403,根据预设解耦规则对所述URL接口中的后台数据进行解耦。在本申请实施例中,在本申请实施例中,利用数据处理接口中的预设解耦规则对后台 数据进行解耦,所述根据预设解耦规则解耦所述后台数据的步骤具体包括:确定后台数据所对应的数据字段名;根据所述数据字段名创建配置对象;根据所述配置对象解耦所述后台数据;具体地,所述确定后台数据所对应的数据字段名,该数据字段名指的是后台数据以字段格式存储时的名称,例如所获取的后台数据字段名为’intUsersNum’、’crnNewUserNum’,所述根据所述字段名配置对象具体为将所获取的数据字段名作为配置对象中键名的键值,每一个键名对应一个键值,每一个键值对应一个数据字段名,例如,假如后台代码的数据字段名为’intUsersNum’、’crnNewUserNum’,我们可以命名配置对象为dataKey,并定义对象dataKey的两个键名分别为’num0’、’num1’,利用预设赋值规则将数据字段名赋予键名的方法可以为’键名’:’数据字段名’,最后通过后台代码的数据字段名作为键值对JSON对象中的两个键名进行赋值,并得到’num0’:’intUsersNum’、’num1’:’crnNewUserNum’,通过将数据字段名作为键值赋予键名即完成了所述数据字段名配置所述配置对象的操作,所述根据所述配置对象解耦所述后台数据具体为根据配置对象获取与后台数据字段名相对应的后台数据作为解耦数据,并完成后台数据的解耦,通过设置配置对象对后台数据进行解耦,能够减弱后台数据对应的数据字段名与前端逻辑代码使用对应的数据字段名之间的耦合关系,假如后台数据中对应的数据字段名改变了,那么前端逻辑代码中很多使用了后台数据的数据字段名的地方,并不会因为后台数据的数据字段名的改变而进行大幅度地修改;获取解耦数据的方法为通过编写调用命令data.intUsersNum以得到后台数据中与数据字段名intUsersNum相对应的解耦数据。S403. Decouple the background data in the URL interface according to a preset decoupling rule. In the embodiment of the present application, in the embodiment of the present application, the background data is decoupled by using a preset decoupling rule in the data processing interface. The step of decoupling the background data according to the preset decoupling rule specifically includes: : Determining a data field name corresponding to the background data; creating a configuration object according to the data field name; decoupling the background data according to the configuration object; specifically, determining the data field name corresponding to the background data, the data The field name refers to the name when the background data is stored in a field format. For example, the obtained background data field names are 'intUsersNum', 'crnNewUserNum', and the configuration object according to the field name is specifically the obtained data field name As the key value of the key name in the configuration object, each key name corresponds to a key value, and each key value corresponds to a data field name. For example, if the data field of the background code is named 'intUsersNum', 'crnNewUserNum', we can name it Configure the object as dataKey and define the two key names of the object dataKey as 'num0' and 'num1', using the presets The method of assigning a data field name to a key name by a value rule can be 'key name': 'data field name', and finally, the two key names in the JSON object are assigned by using the data field name of the background code as the key value, and get ' num0 ':' intUsersNum ',' num1 ':' crnNewUserNum ', the operation of configuring the configuration object for the data field name is completed by assigning the data field name as a key value to the key name, and the solution is based on the configuration object solution The coupling of the background data is specifically to obtain the background data corresponding to the background data field name as the decoupling data according to the configuration object and complete the decoupling of the background data. By setting the configuration object to decouple the background data, the background data correspondence can be weakened The coupling relationship between the data field name and the front-end logic code uses the corresponding data field name. If the corresponding data field name in the background data is changed, then the front-end logic code uses the data field name of the background data in many places, and Will not be significantly modified by changing the data field name of the background data; get decoupled data The method is to write the calling command data.intUsersNum to get the decoupled data corresponding to the data field name intUsersNum in the background data.
S404,根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。在本申请实施例中,在本申请实施例中,所述预设处理规则指的是根据数据处理的需要将后台数据转换成用户所需格式的数据,具体的处理规则可以由用户自行定义,在此不作限制,例如,我们经常会简化上亿的后台数据,并得到除以万或者除以亿,并取百分点后几位小数的简化数据进行显示,可选的,简化的方法为:在数据处理接口定义数据处理对象,在数据处理对象中定义数据处理规则,如一条后台数据为1836000000,我们需要的数据格式是1.84亿,那我们需要把数据除以10000000,又要取小数点后两位,在数据处理对象中通过调用函数getRuleData()得到解耦的后台数据1836000000,通过定义后台数据 处理数组[‘yi’,2]将解耦的后台数据除以一亿,并保留两位小数,最后得到所需要的简化数据1.84亿;再例如,后台数据为1836000000,我们需要的数据格式是183600万,那我们需要把数据除以10000,又要取小数点后1位,在数据处理对象中通过调用函数getRuleData()得到解耦的后台数据1836000000,通过定义后台数据处理数组[‘wan’,1]将解耦的后台数据除以一万,并保留一位小数,最后得到所需要的简化数据183600.0万。S404: Process the decoupled background data according to a preset processing rule to simplify the background data. In the embodiment of the present application, in the embodiment of the present application, the preset processing rule refers to converting background data into data in a format required by a user according to a data processing requirement, and a specific processing rule may be defined by a user. There are no restrictions here. For example, we often simplify hundreds of millions of background data, and get simplified data that is divided by 10,000 or divided by hundreds of millions, and the decimal places after the percentage point are displayed. The optional, simplified method is: The data processing interface defines the data processing object, and defines the data processing rules in the data processing object. For example, a background data is 1836000000, and the data format we need is 184 million. Then we need to divide the data by 10000000, and then take the two decimal places. , Get the decoupled background data 1836000000 by calling the function getRuleData () in the data processing object, divide the decoupled background data by 100 million by defining the background data processing array ['yi', 2], and keep two decimal places, Finally, the required simplified data is 184 million; for example, the background data is 1836000000, and the data format we need is 18360 0 million, then we need to divide the data by 10,000, and then take one decimal place, in the data processing object by calling the function getRuleData () to get the decoupled background data of 1836000000, by defining the background data processing array ['wan', 1] Divide the decoupled background data by 10,000 and keep one decimal place, and finally get the required simplified data of 1.8360 million.
S405,获取已处理的后台数据的特征参数。在本申请实施例中,获取经过预设处理规则处理后的后台数据的特征参数,该特征参数用于区别待处理的后台数据与已处理的后台数据,可选的,该特征参数可以是对后台数据进行简化后的数字单位,例如“千”、“万”等等。S405. Acquire a characteristic parameter of the processed background data. In the embodiment of the present application, a characteristic parameter of the background data processed by a preset processing rule is obtained, and the characteristic parameter is used to distinguish the background data to be processed from the processed background data. Optionally, the characteristic parameter may be Background data are simplified digital units, such as "thousands", "ten thousand", and so on.
S406,判断所述特征参数是否与预先规定的数据格式参数相匹配。在本申请实施例中,可以在判断所述特征参数的数据格式之前,对后台数据进行数据处理后的特征参数的数据格式进行规定,例如,后台数据为1836000000,我们需要的数据格式是183600万,那么预先规定该后台数据处理后的数据格式为除以一万,处理后的数字单位为“万”,针对后台数据的不同特征参数,若处理后的特征参数的数据格式不符合预先规定的数据格式,即可判断所处理的后台数据无效。S406: Determine whether the characteristic parameter matches a predetermined data format parameter. In the embodiment of the present application, before judging the data format of the characteristic parameter, the data format of the characteristic parameter after the background data is processed may be specified. For example, the background data is 1836000000, and the data format we need is 183.6 million. , Then the data format of the background data after processing is divided in advance by 10,000, and the digital unit after processing is "10,000". For different characteristic parameters of the background data, if the data format of the processed characteristic parameters does not meet the pre-defined Data format, you can judge that the background data processed is invalid.
S407,若所述特征参数与预先规定的数据格式参数相匹配,判定所述已处理的后台数据有效。在本申请实施例中,针对已处理的后台数据,若处理后的特征参数的数据格式符合预先规定的数据格式,判定已处理的后台数据有效。S407. If the characteristic parameter matches a predetermined data format parameter, determine that the processed background data is valid. In the embodiment of the present application, for the processed background data, if the data format of the processed characteristic parameters conforms to a predetermined data format, it is determined that the processed background data is valid.
请参阅图5,对应上述一种数据处理方法,本申请实施例还提出一种数据处理装置,该装置100包括:建立单元101、第一获取单元102、解耦单元103、处理单元104。Referring to FIG. 5, corresponding to the foregoing data processing method, an embodiment of the present application further provides a data processing apparatus. The apparatus 100 includes: a establishing unit 101, a first obtaining unit 102, a decoupling unit 103, and a processing unit 104.
其中,所述建立单元101,用于预先建立数据处理接口与URL接口的数据传输通道。传输单元102,用于根据所述数据传输通道获取所述URL接口中的后台数据。解耦单元103,用于根据预设解耦规则对所述URL接口中的后台数据进行解耦。处理单元104,用于根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。The establishing unit 101 is configured to establish a data transmission channel of a data processing interface and a URL interface in advance. The transmission unit 102 is configured to acquire background data in the URL interface according to the data transmission channel. The decoupling unit 103 is configured to decouple the background data in the URL interface according to a preset decoupling rule. The processing unit 104 is configured to process the decoupled background data according to a preset processing rule to simplify the background data.
由以上可见,本申请实施例通过预先建立数据处理接口与URL接口的数据传输通道;根据所述数据传输通道获取所述URL接口中的后台数据;根据预设 解耦规则对所述URL接口中的后台数据进行解耦;根据预设处理规则对已解耦的后台数据进行处理,从而达到简化所述后台数据的目的。本申请实施例能够在很大程度上简化后台数据的处理逻辑,并提高后台数据的处理效率。As can be seen from the above, the embodiments of the present application establish a data transmission channel of a data processing interface and a URL interface in advance; obtain background data in the URL interface according to the data transmission channel; Background data is decoupled; the decoupled background data is processed according to a preset processing rule, so as to achieve the purpose of simplifying the background data. The embodiments of the present application can greatly simplify the processing logic of background data and improve the processing efficiency of background data.
如图6所示,所述建立单元101,包括:第一创建单元1011,用于创建URL接口对象。第二创建单元1012,用于创建数据处理接口对象。设置单元1013,用于设置所述URL接口对象与所述数据处理接口对象为相同路径。建立子单元1014,用于根据所设置的相同路径建立所述数据传输通道。As shown in FIG. 6, the establishment unit 101 includes a first creation unit 1011 for creating a URL interface object. The second creating unit 1012 is configured to create a data processing interface object. A setting unit 1013 is configured to set the URL interface object and the data processing interface object to the same path. A establishing subunit 1014 is configured to establish the data transmission channel according to the same path that is set.
如图7所示,所述解耦单元103,包括:确定单元1031,用于确定后台数据所对应的数据字段名。第三创建单元1032,用于根据所述数据字段名创建配置对象。解耦子单元1033,用于根据所述配置对象解耦所述后台数据。As shown in FIG. 7, the decoupling unit 103 includes a determining unit 1031 configured to determine a data field name corresponding to the background data. The third creating unit 1032 is configured to create a configuration object according to the data field name. A decoupling subunit 1033 is configured to decouple the background data according to the configuration object.
请参阅图8,对应上述一种数据处理方法,本申请实施例还提出一种数据处理装置,该装置200包括:建立单元201、第二获取单元202、第一获取单元203、解耦单元204、处理单元205。Referring to FIG. 8, corresponding to the foregoing data processing method, an embodiment of the present application further provides a data processing apparatus. The apparatus 200 includes: a establishing unit 201, a second obtaining unit 202, a first obtaining unit 203, and a decoupling unit 204. 、 Processing unit 205.
其中,所述建立单元201,用于预先建立数据处理接口与URL接口的数据传输通道。第二获取单元202,用于所述URL接口根据预先设置的配置路径获取所述后台数据。第一获取单元203,用于根据所述数据传输通道获取所述URL接口中的后台数据。解耦单元204,用于根据预设解耦规则对所述URL接口中的后台数据进行解耦。处理单元205,用于根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。The establishing unit 201 is configured to establish a data transmission channel of a data processing interface and a URL interface in advance. The second obtaining unit 202 is configured for the URL interface to obtain the background data according to a preset configuration path. The first obtaining unit 203 is configured to obtain background data in the URL interface according to the data transmission channel. The decoupling unit 204 is configured to decouple the background data in the URL interface according to a preset decoupling rule. The processing unit 205 is configured to process the decoupled background data according to a preset processing rule to simplify the background data.
请参阅图9,对应上述一种数据处理方法,本申请实施例还提出一种数据处理装置,该装置300包括:建立单元301、第一获取单元302、解耦单元303、处理单元304、第三获取单元305、判断单元306、判定单元307。Referring to FIG. 9, corresponding to the foregoing data processing method, an embodiment of the present application further provides a data processing device. The device 300 includes: a establishing unit 301, a first obtaining unit 302, a decoupling unit 303, a processing unit 304, a first Three acquisition units 305, a judgment unit 306, and a judgment unit 307.
其中,所述建立单元301,用于预先建立数据处理接口与URL接口的数据传输通道。第一获取单元302,用于根据所述数据传输通道获取所述URL接口中的后台数据。解耦单元303,用于根据预设解耦规则对所述URL接口中的后台数据进行解耦。处理单元304,用于根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。第三获取单元305,用于获取已处理的后台数据的特征参数。判断单元306,用于判断所述特征参数是否与预先规定的数据格式参数相匹配。判定单元307,用于若所述特征参数与预先规定的数据格式参数相匹配,判定所述已处理的后台数据有效。The establishing unit 301 is configured to establish a data transmission channel of a data processing interface and a URL interface in advance. The first obtaining unit 302 is configured to obtain background data in the URL interface according to the data transmission channel. The decoupling unit 303 is configured to decouple the background data in the URL interface according to a preset decoupling rule. The processing unit 304 is configured to process the decoupled background data according to a preset processing rule to simplify the background data. The third obtaining unit 305 is configured to obtain a characteristic parameter of the processed background data. The judging unit 306 is configured to judge whether the characteristic parameter matches a predetermined data format parameter. A determining unit 307 is configured to determine that the processed background data is valid if the characteristic parameter matches a predetermined data format parameter.
上述数据处理装置与上述数据处理方法一一对应,其具体的原理和过程与上述实施例所述方法相同,不再赘述。The above-mentioned data processing device corresponds to the above-mentioned data processing method in a one-to-one manner, and its specific principles and processes are the same as the methods described in the above embodiments, and will not be described again.
上述数据处理装置可以实现为一种计算机程序的形式,计算机程序可以在如图10所示的计算机设备上运行。The above data processing apparatus may be implemented in the form of a computer program, and the computer program may be run on a computer device as shown in FIG. 10.
图10为本申请一种计算机设备的结构组成示意图。该设备可以是终端,也可以是服务器,其中,终端可以是智能手机、平板电脑、笔记本电脑、台式电脑、个人数字助理和穿戴式装置等具有通信功能的电子装置。服务器可以是独立的服务器,也可以是多个服务器组成的服务器集群。参照图10,该计算机设备500包括通过系统总线501连接的处理器502、非易失性存储介质503、内存储器504和网络接口505。其中,该计算机设备500的非易失性存储介质503可存储操作系统5031和计算机程序5032,该计算机程序5032被执行时,可使得处理器502执行一种数据处理方法。该计算机设备500的处理器502用于提供计算和控制能力,支撑整个计算机设备500的运行。该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序被处理器执行时,可使得处理器502执行一种数据处理方法。计算机设备500的网络接口505用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图10中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。FIG. 10 is a schematic structural diagram of a computer device of the present application. The device may be a terminal or a server. The terminal may be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server can be an independent server or a server cluster consisting of multiple servers. Referring to FIG. 10, the computer device 500 includes a processor 502, a non-volatile storage medium 503, an internal memory 504, and a network interface 505 connected through a system bus 501. The non-volatile storage medium 503 of the computer device 500 can store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 can execute a data processing method. The processor 502 of the computer device 500 is used to provide computing and control capabilities to support the operation of the entire computer device 500. The internal memory 504 provides an environment for running the computer program 5032 in the non-volatile storage medium 503, and when the computer program is executed by the processor, the processor 502 can execute a data processing method. The network interface 505 of the computer device 500 is used for network communication, such as sending assigned tasks. Those skilled in the art can understand that the structure shown in FIG. 10 is only a block diagram of a part of the structure related to the solution of the application, and does not constitute a limitation on the computer equipment to which the solution of the application is applied. The specific computer equipment may be Include more or fewer parts than shown in the figure, or combine certain parts, or have a different arrangement of parts.
其中,所述处理器502执行所述计算机程序时实现如下操作:预先建立数据处理接口与URL接口的数据传输通道;根据所述数据传输通道获取所述URL接口中的后台数据;根据预设解耦规则对所述URL接口中的后台数据进行解耦;根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。The processor 502 executes the computer program to implement the following operations: establishing a data transmission channel of a data processing interface and a URL interface in advance; obtaining background data in the URL interface according to the data transmission channel; Decoupling rules decouple background data in the URL interface; and process decoupled background data according to a preset processing rule to simplify the background data.
在一个实施例中,所述预先建立数据处理接口与URL接口的数据传输通道,包括:创建URL接口对象;创建数据处理接口对象;设置所述URL接口对象与所述数据处理接口对象为相同路径;根据所设置的相同路径建立所述数据传输通道。In one embodiment, the pre-established data transmission channel of the data processing interface and the URL interface includes: creating a URL interface object; creating a data processing interface object; setting the URL interface object and the data processing interface object to the same path ; Establishing the data transmission channel according to the same path that is set.
在一个实施例中,所述处理器502执行所述计算机程序时还实现如下操作:所述URL接口根据预先设置的配置路径获取所述后台数据。In one embodiment, when the processor 502 executes the computer program, the following operation is further implemented: the URL interface acquires the background data according to a preset configuration path.
在一个实施例中,根据预设解耦规则对所述URL接口中的后台数据进行解 耦,包括:确定后台数据所对应的数据字段名;根据所述数据字段名创建配置对象;根据所述配置对象解耦所述后台数据。In one embodiment, decoupling the background data in the URL interface according to a preset decoupling rule includes: determining a data field name corresponding to the background data; creating a configuration object according to the data field name; and according to the The configuration object decouples the background data.
在一个实施例中,所述处理器502执行所述计算机程序时还实现如下操作:获取已处理的后台数据的特征参数;判断所述特征参数是否与预先规定的数据格式参数相匹配;若所述特征参数与预先规定的数据格式参数相匹配,判定所述已处理的后台数据有效。In one embodiment, when the processor 502 executes the computer program, the following operations are further implemented: obtaining characteristic parameters of the processed background data; determining whether the characteristic parameters match a predetermined data format parameter; if all The characteristic parameter matches a predetermined data format parameter, and it is determined that the processed background data is valid.
本领域技术人员可以理解,图10中示出的计算机设备的实施例并不构成对计算机设备具体构成的限定,在其他实施例中,计算机设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。例如,在一些实施例中,计算机设备仅包括存储器及处理器,在这样的实施例中,存储器及处理器的结构及功能与图10所示实施例一致,在此不再赘述。Those skilled in the art can understand that the embodiment of the computer device shown in FIG. 10 does not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure. Either some parts are combined or different parts are arranged. For example, in some embodiments, the computer device only includes a memory and a processor. In such an embodiment, the structure and function of the memory and the processor are consistent with the embodiment shown in FIG. 10, and details are not described herein again.
本申请提供了一种计算机可读存储介质,计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行,以实现本申请所述的数据处理方法。This application provides a computer-readable storage medium. The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the functions described in this application. Data processing methods.
本申请前述的存储介质包括:磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等各种可以存储程序代码的介质。The foregoing storage medium of the present application includes: various media that can store program code, such as a magnetic disk, an optical disc, and a read-only memory (Read-Only Memory, ROM).
本申请所有实施例中的单元可以通过通用集成电路,例如CPU(Central Processing Unit,中央处理器),或通过ASIC(Application Specific Integrated Circuit,专用集成电路)来实现。The units in all embodiments of the present application may be implemented by a general integrated circuit, such as a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit, ASIC).
本申请实施例数据处理方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the data processing method in the embodiment of the present application can be adjusted, combined, and deleted according to actual needs.
本申请实施例数据处理装置中的单元可以根据实际需要进行合并、划分和删减。Units in the data processing apparatus in the embodiments of the present application may be combined, divided, and deleted according to actual needs.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above is only a specific implementation of this application, but the scope of protection of this application is not limited to this. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements should be covered by the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (20)

  1. 一种数据处理方法,其特征在于,所述方法包括:A data processing method, characterized in that the method includes:
    预先建立数据处理接口与URL接口的数据传输通道;Establish a data transmission channel of a data processing interface and a URL interface in advance;
    根据所述数据传输通道获取所述URL接口中的后台数据;Obtaining background data in the URL interface according to the data transmission channel;
    根据预设解耦规则对所述URL接口中的后台数据进行解耦;Decoupling background data in the URL interface according to a preset decoupling rule;
    根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。The decoupled background data is processed according to a preset processing rule to simplify the background data.
  2. 如权利要求1所述的方法,其特征在于,所述预先建立数据处理接口与URL接口的数据传输通道,包括:The method according to claim 1, wherein the pre-established data transmission channel of the data processing interface and the URL interface comprises:
    创建URL接口对象;Create a URL interface object;
    创建数据处理接口对象;Create a data processing interface object;
    设置所述URL接口对象与所述数据处理接口对象为相同路径;Setting the URL interface object and the data processing interface object to the same path;
    根据所设置的相同路径建立所述数据传输通道。The data transmission channel is established according to the same path that is set.
  3. 如权利要求1所述的方法,其特征在于,根据所述数据传输通道获取所述URL接口中的后台数据之前,所述方法包括:The method according to claim 1, wherein before acquiring background data in the URL interface according to the data transmission channel, the method comprises:
    所述URL接口根据预先设置的配置路径获取所述后台数据。The URL interface acquires the background data according to a preset configuration path.
  4. 如权利要求1所述的方法,其特征在于,根据预设解耦规则对所述URL接口中的后台数据进行解耦,包括:The method according to claim 1, wherein decoupling the background data in the URL interface according to a preset decoupling rule comprises:
    确定后台数据所对应的数据字段名;Determine the data field name corresponding to the background data;
    根据所述数据字段名创建配置对象;Creating a configuration object according to the data field name;
    根据所述配置对象解耦所述后台数据。Decoupling the background data according to the configuration object.
  5. 如权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, further comprising:
    获取已处理的后台数据的特征参数;Get the characteristic parameters of the processed background data;
    判断所述特征参数是否与预先规定的数据格式参数相匹配;Judging whether the characteristic parameter matches a predetermined data format parameter;
    若所述特征参数与预先规定的数据格式参数相匹配,判定所述已处理的后台数据有效。If the characteristic parameter matches a predetermined data format parameter, it is determined that the processed background data is valid.
  6. 一种数据处理装置,其特征在于,所述装置包括:A data processing device, characterized in that the device includes:
    建立单元,用于预先建立数据处理接口与URL接口的数据传输通道;A establishing unit for establishing a data transmission channel of a data processing interface and a URL interface in advance;
    第一获取单元,用于根据所述数据传输通道获取所述URL接口中的后台数据;A first obtaining unit, configured to obtain background data in the URL interface according to the data transmission channel;
    解耦单元,用于根据预设解耦规则对所述URL接口中的后台数据进行解耦;A decoupling unit, configured to decouple background data in the URL interface according to a preset decoupling rule;
    处理单元,用于根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。The processing unit is configured to process the decoupled background data according to a preset processing rule to simplify the background data.
  7. 如权利要求6所述的装置,其特征在于,所述建立单元,包括:The apparatus according to claim 6, wherein the establishing unit comprises:
    第一创建单元,用于创建URL接口对象;A first creating unit, configured to create a URL interface object;
    第二创建单元,用于创建数据处理接口对象;A second creating unit, configured to create a data processing interface object;
    设置单元,用于设置所述URL接口对象与所述数据处理接口对象为相同路径;A setting unit, configured to set the URL interface object and the data processing interface object to the same path;
    建立子单元,用于根据所设置的相同路径建立所述数据传输通道。A establishing subunit is configured to establish the data transmission channel according to the same path that is set.
  8. 如权利要求6所述的装置,其特征在于,所述装置还包括:The apparatus according to claim 6, further comprising:
    第二获取单元,用于所述URL接口根据预先设置的配置路径获取所述后台数据。A second obtaining unit is configured to obtain the background data by the URL interface according to a preset configuration path.
  9. 如权利要求6所述的装置,其特征在于,所述解耦单元,包括:The apparatus according to claim 6, wherein the decoupling unit comprises:
    确定单元,用于确定后台数据所对应的数据字段名;A determining unit for determining a data field name corresponding to the background data;
    第三创建单元,用于根据所述数据字段名创建配置对象;A third creating unit, configured to create a configuration object according to the data field name;
    解耦子单元,用于根据所述配置对象解耦所述后台数据。A decoupling subunit, configured to decouple the background data according to the configuration object.
  10. 如权利要求6所述的装置,其特征在于,所述装置还包括:The apparatus according to claim 6, further comprising:
    第三获取单元,用于获取已处理的后台数据的特征参数;A third obtaining unit, configured to obtain characteristic parameters of the processed background data;
    判断单元,用于判断所述特征参数是否与预先规定的数据格式参数相匹配;A judging unit, configured to judge whether the characteristic parameter matches a predetermined data format parameter;
    判定单元,用于若所述特征参数与预先规定的数据格式参数相匹配,判定所述已处理的后台数据有效。A determining unit is configured to determine that the processed background data is valid if the characteristic parameter matches a predetermined data format parameter.
  11. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如下操作:A computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and is characterized in that, when the processor executes the computer program, the following operations are implemented:
    预先建立数据处理接口与URL接口的数据传输通道;Establish a data transmission channel of a data processing interface and a URL interface in advance;
    根据所述数据传输通道获取所述URL接口中的后台数据;Obtaining background data in the URL interface according to the data transmission channel;
    根据预设解耦规则对所述URL接口中的后台数据进行解耦;Decoupling background data in the URL interface according to a preset decoupling rule;
    根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。The decoupled background data is processed according to a preset processing rule to simplify the background data.
  12. 如权利要求11所述的计算机设备,其特征在于,所述预先建立数据处理接口与URL接口的数据传输通道,包括:The computer device according to claim 11, wherein the pre-established data transmission channel of the data processing interface and the URL interface comprises:
    创建URL接口对象;Create a URL interface object;
    创建数据处理接口对象;Create a data processing interface object;
    设置所述URL接口对象与所述数据处理接口对象为相同路径;Setting the URL interface object and the data processing interface object to the same path;
    根据所设置的相同路径建立所述数据传输通道。The data transmission channel is established according to the same path that is set.
  13. 如权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机程序时还实现如下操作:The computer device according to claim 11, wherein the processor, when executing the computer program, further implements the following operations:
    所述URL接口根据预先设置的配置路径获取所述后台数据。The URL interface acquires the background data according to a preset configuration path.
  14. 如权利要求11所述的计算机设备,其特征在于,根据预设解耦规则对所述URL接口中的后台数据进行解耦,包括:The computer device according to claim 11, wherein decoupling the background data in the URL interface according to a preset decoupling rule comprises:
    确定后台数据所对应的数据字段名;Determine the data field name corresponding to the background data;
    根据所述数据字段名创建配置对象;Creating a configuration object according to the data field name;
    根据所述配置对象解耦所述后台数据。Decoupling the background data according to the configuration object.
  15. 如权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机程序时还实现如下操作:The computer device according to claim 11, wherein the processor, when executing the computer program, further implements the following operations:
    获取已处理的后台数据的特征参数;Get the characteristic parameters of the processed background data;
    判断所述特征参数是否与预先规定的数据格式参数相匹配;Judging whether the characteristic parameter matches a predetermined data format parameter;
    若所述特征参数与预先规定的数据格式参数相匹配,判定所述已处理的后台数据有效。If the characteristic parameter matches a predetermined data format parameter, it is determined that the processed background data is valid.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行,以实现如下步骤:A computer-readable storage medium is characterized in that the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the following steps:
    预先建立数据处理接口与URL接口的数据传输通道;Establish a data transmission channel of a data processing interface and a URL interface in advance;
    根据所述数据传输通道获取所述URL接口中的后台数据;Obtaining background data in the URL interface according to the data transmission channel;
    根据预设解耦规则对所述URL接口中的后台数据进行解耦;Decoupling background data in the URL interface according to a preset decoupling rule;
    根据预设处理规则对已解耦的后台数据进行处理,以简化所述后台数据。The decoupled background data is processed according to a preset processing rule to simplify the background data.
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,所述预先建立数据处理接口与URL接口的数据传输通道,包括:The computer-readable storage medium of claim 16, wherein the pre-established data transmission channel of the data processing interface and the URL interface comprises:
    创建URL接口对象;Create a URL interface object;
    创建数据处理接口对象;Create a data processing interface object;
    设置所述URL接口对象与所述数据处理接口对象为相同路径;Setting the URL interface object and the data processing interface object to the same path;
    根据所设置的相同路径建立所述数据传输通道。The data transmission channel is established according to the same path that is set.
  18. 如权利要求16所述的计算机可读存储介质,其特征在于,还实现如下步骤:The computer-readable storage medium of claim 16, further comprising the following steps:
    所述URL接口根据预先设置的配置路径获取所述后台数据。The URL interface acquires the background data according to a preset configuration path.
  19. 如权利要求16所述的计算机可读存储介质,其特征在于,所述根据预设解耦规则对所述URL接口中的后台数据进行解耦,包括:The computer-readable storage medium of claim 16, wherein the decoupling the background data in the URL interface according to a preset decoupling rule comprises:
    确定后台数据所对应的数据字段名;Determine the data field name corresponding to the background data;
    根据所述数据字段名创建配置对象;Creating a configuration object according to the data field name;
    根据所述配置对象解耦所述后台数据。Decoupling the background data according to the configuration object.
  20. 如权利要求16所述的计算机可读存储介质,其特征在于,所述一个或者一个以上程序被一个或者一个以上的处理器执行时,还实现如下步骤:The computer-readable storage medium of claim 16, wherein when the one or more programs are executed by one or more processors, the following steps are further implemented:
    获取已处理的后台数据的特征参数;Get the characteristic parameters of the processed background data;
    判断所述特征参数是否与预先规定的数据格式参数相匹配;Judging whether the characteristic parameter matches a predetermined data format parameter;
    若所述特征参数与预先规定的数据格式参数相匹配,判定所述已处理的后台数据有效。If the characteristic parameter matches a predetermined data format parameter, it is determined that the processed background data is valid.
PCT/CN2018/101879 2018-05-30 2018-08-23 Data processing method and apparatus, and computer device and storage medium WO2019227702A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810539634.2 2018-05-30
CN201810539634.2A CN108694249B (en) 2018-05-30 2018-05-30 Data processing method, data processing device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2019227702A1 true WO2019227702A1 (en) 2019-12-05

Family

ID=63848281

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/101879 WO2019227702A1 (en) 2018-05-30 2018-08-23 Data processing method and apparatus, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN108694249B (en)
WO (1) WO2019227702A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710336A (en) * 2009-12-14 2010-05-19 浪潮通信信息系统有限公司 Method for accelerating data processing by using relational middleware
CN105488162A (en) * 2015-11-30 2016-04-13 用友优普信息技术有限公司 Data processing method and apparatus
CN105739970A (en) * 2016-01-20 2016-07-06 北京京东尚科信息技术有限公司 Method and device for mapping data into custom class object

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101278354A (en) * 2005-09-30 2008-10-01 莫塞德技术公司 Multiple independent serial link memory
CN101387957B (en) * 2008-09-12 2011-04-20 成都市华为赛门铁克科技有限公司 Multi-path software implementing apparatus and method
DE102008053105A1 (en) * 2008-10-24 2010-04-29 Dr. Johannes Heidenhain Gmbh Device and method for data transmission between a position measuring device and a subsequent electronics
US9489166B2 (en) * 2011-08-19 2016-11-08 Novatek Microelectronics Corp. Data transmission method and display driving system
TWI465923B (en) * 2011-11-21 2014-12-21 Acer Inc Interface apparatus, connecting system thereof and connecting method thereof
CN104065678B (en) * 2013-03-21 2017-06-13 中国科学院声学研究所 A kind of dual mode data based on built-in browser is received and access method
CN104252481B (en) * 2013-06-27 2018-10-19 阿里巴巴集团控股有限公司 The dynamic check method and apparatus of master-slave database consistency
CN103647652B (en) * 2013-12-20 2017-06-09 北京奇虎科技有限公司 A kind of method for realizing data transfer, device and server
CN104317369A (en) * 2014-10-17 2015-01-28 国家电网公司 Anti-electromagnetic interference communication port for high voltage relay protection microcomputer system
CN106202551A (en) * 2016-07-27 2016-12-07 广东欧珀移动通信有限公司 A kind of file management method, device and mobile terminal
CN106911707B (en) * 2017-03-15 2020-01-03 中国科学技术大学 Bidirectional decoupling transmission control method and system
CN107220274B (en) * 2017-04-13 2020-10-09 中科曙光南京研究院有限公司 Visual data interface market realization method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710336A (en) * 2009-12-14 2010-05-19 浪潮通信信息系统有限公司 Method for accelerating data processing by using relational middleware
CN105488162A (en) * 2015-11-30 2016-04-13 用友优普信息技术有限公司 Data processing method and apparatus
CN105739970A (en) * 2016-01-20 2016-07-06 北京京东尚科信息技术有限公司 Method and device for mapping data into custom class object

Also Published As

Publication number Publication date
CN108694249B (en) 2022-02-25
CN108694249A (en) 2018-10-23

Similar Documents

Publication Publication Date Title
CN107896162B (en) Deployment method and device of monitoring system, computer equipment and storage medium
WO2019136800A1 (en) Service processing method, apparatus and device, and computer-readable storage medium
WO2018049888A1 (en) Application data migration method and device
CN108776587B (en) Data acquisition method and device, computer equipment and storage medium
CN106547580B (en) Method and device for hooking function, mobile terminal and storage medium
CN104732164A (en) Device and method both for accelerating SSL (Security Socket Layer) data processing speed
CN113806037A (en) Service calling method and device, storage medium and electronic equipment
CN112445729A (en) Operation address determination method, PCIe system, electronic device and storage medium
WO2019161620A1 (en) Application dependency update method, terminal and device, and storage medium
CN113641700A (en) Data processing method and device based on Spring boot frame
CN108234551B (en) Data processing method and device
CN106775835B (en) Method, server and terminal for acquiring upgrade file
CN111061468B (en) Mapping method and device
CN111294377B (en) Dependency network request sending method, terminal device and storage medium
WO2019227702A1 (en) Data processing method and apparatus, and computer device and storage medium
CN112947907A (en) Method for creating code branch
CN116302271A (en) Page display method and device and electronic equipment
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN113779122B (en) Method and device for exporting data
JP7427775B2 (en) Stored procedure execution method, device, database system, and storage medium
CN112261072B (en) Service calling method, device, equipment and storage medium
CN114564210A (en) Copy deployment method, device, system, electronic equipment and storage medium
WO2020220272A1 (en) Method and system for changing resource state, terminal, and storage medium
CN113760487A (en) Service processing method and device
CN110554906A (en) virtual machine configuration management method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18921188

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18921188

Country of ref document: EP

Kind code of ref document: A1