CN110865797A - Method and device for processing dynamic attributes of services - Google Patents

Method and device for processing dynamic attributes of services Download PDF

Info

Publication number
CN110865797A
CN110865797A CN201810986994.7A CN201810986994A CN110865797A CN 110865797 A CN110865797 A CN 110865797A CN 201810986994 A CN201810986994 A CN 201810986994A CN 110865797 A CN110865797 A CN 110865797A
Authority
CN
China
Prior art keywords
service type
dynamic attribute
attribute
user
dynamic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810986994.7A
Other languages
Chinese (zh)
Inventor
董志强
曲海龙
王晓迪
王振
柳希
邵佳琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810986994.7A priority Critical patent/CN110865797A/en
Publication of CN110865797A publication Critical patent/CN110865797A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design

Abstract

The invention discloses a method and a device for processing dynamic attributes of services, and relates to the technical field of computers. One embodiment of the method comprises: acquiring a service type through a user-defined domain interface, and determining the dynamic attribute of the service type and a user-defined domain rule thereof from a user-defined domain table; sending the dynamic attribute of the service type; receiving a value of a dynamic attribute of the service type; and checking whether the value of the dynamic attribute accords with a custom domain rule, and if so, storing the value of the dynamic attribute. The embodiment of the invention realizes the general functions of the two interfaces by adding the custom domain interface and the call submission interface, and solves the problem that a plurality of sets of codes need to be maintained in the prior art. Meanwhile, the problems that the project is re-released on line and the program cannot be on line immediately are solved, the user-defined domain table is configured at the server side, the user-defined domain table can be on line immediately after configuration is completed, risks caused by repeated on line are avoided, and the maintainability of the program is improved.

Description

Method and device for processing dynamic attributes of services
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a service dynamic attribute.
Background
The order confirmation page is a page for selecting or displaying attributes such as a brand, a face value, a region, a payment method, and the like of a commodity. Different business types (commodity types) and different attributes displayed in order confirmation pages are different, different order confirmation pages are usually called in a website according to the business types, and how many hard codes are judged in an order submitting interface, so that the unified design is difficult.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
1. only fixed attributes are supported, after the attributes are newly added, the page needs to be redeveloped, and meanwhile, the judgment on the new attributes needs to be added when an order interface is submitted.
2. Because the attributes of the services are different, a plurality of sets of order confirmation pages are developed according to the service types, hard coding judgment needs to be added every time the order interface logic is submitted, the development cost is high, the maintenance cost is high, continuous development is needed when a new service exists, a plurality of sets of logic codes are maintained, and expansion is not easy.
3. After a new page is developed by a new service, a project needs to be compiled again when the new page is online, the process is troublesome, and the real-time online cannot be realized.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for processing a dynamic attribute of a service, which can process the dynamic attribute of the service, and solve the problem in the prior art that only fixed attributes are supported, multiple sets of logic codes are maintained, and expansion is not easy.
In order to achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a method for processing a dynamic attribute of a service, which is applied to a server, and includes: acquiring a service type through a user-defined domain interface, and determining the dynamic attribute of the service type and a user-defined domain rule thereof from a user-defined domain table according to the service type; sending the dynamic attribute of the service type through the user-defined domain interface; receiving a value of a dynamic attribute of the service type through a submission interface; and checking whether the value of the dynamic attribute accords with the user-defined domain rule of the service type, and if so, storing the value of the dynamic attribute.
Optionally, before obtaining the service type through the custom domain interface, the method further includes: and configuring a custom domain table according to the service type, wherein the custom domain table comprises the service type, the corresponding dynamic attribute and the custom domain rule.
Optionally, determining the dynamic attribute of the service type according to the service type includes: checking whether the client is legal or not according to the client identifier for sending the service type; and if the service type is legal, determining the dynamic attribute corresponding to the service type in a user-defined domain table according to the service type.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a method for processing dynamic attributes, applied to a client, including: sending the service type; calling a custom domain interface to receive the dynamic attribute of the service type; generating a public page according to the fixed attribute and the dynamic attribute of the service type; and obtaining the value of the dynamic attribute of the service type according to the public page, and sending the value of the dynamic attribute.
Optionally, sending the value of the dynamic attribute includes: converting the format of the value of the dynamic attribute of the service type into a json format; and placing the converted value of the dynamic attribute into a specified hidden field, and calling a submission interface to send the value to a server by using a hypertext transfer protocol.
Optionally, invoking a custom domain interface to receive the dynamic attribute of the service type, including: asynchronously inquiring a user-defined domain interface in an ajax mode, and receiving the dynamic attribute of the service type through the user-defined domain interface; and/or generating a public page according to the fixed attribute and the dynamic attribute of the service type, wherein the public page comprises the following steps: acquiring a fixed attribute; and generating a public page through JavaScript rendering according to the fixed attribute and the dynamic attribute of the service type.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided an apparatus for processing a dynamic attribute of a service, disposed at a server, including: a determination module to: acquiring a service type through a user-defined domain interface, and determining the dynamic attribute of the service type and a user-defined domain rule thereof from a user-defined domain table according to the service type; a first sending module configured to: sending the dynamic attribute of the service type through the user-defined domain interface; a first receiving module to: receiving a value of a dynamic attribute of the service type through a submission interface; a check save module for: and checking whether the value of the dynamic attribute accords with the user-defined domain rule of the service type, and if so, storing the value of the dynamic attribute.
Optionally, the apparatus further comprises a configuration module configured to: and configuring a custom domain table according to the service type, wherein the custom domain table comprises the service type, the corresponding dynamic attribute and the custom domain rule.
Optionally, the determining module is further configured to: checking whether the client is legal or not according to the client identifier for sending the service type; and if the service type is legal, determining the dynamic attribute corresponding to the service type in a user-defined domain table according to the service type.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided an apparatus for processing a dynamic attribute, configured at a client, including: a second sending module, configured to: sending the service type; a second receiving module to: calling a custom domain interface to receive the dynamic attribute of the service type; a page generation module to: generating a public page according to the fixed attribute and the dynamic attribute of the service type; a commit module to: and obtaining the value of the dynamic attribute of the service type according to the public page, and sending the value of the dynamic attribute.
Optionally, the submitting module is further configured to: converting the format of the value of the dynamic attribute of the service type into a json format; and placing the converted value of the dynamic attribute into a specified hidden field, and calling a submission interface to send the value to a server by using a hypertext transfer protocol.
Optionally, the second receiving module is further configured to: asynchronously inquiring a user-defined domain interface in an ajax mode, and receiving the dynamic attribute of the service type through the user-defined domain interface; and/or the page generation module is also used for: acquiring a fixed attribute; and generating a public page through JavaScript rendering according to the fixed attribute and the dynamic attribute of the service type.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an electronic apparatus including: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing the service dynamic attribute provided by the embodiment of the invention.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a computer readable medium on which a computer program is stored, the program, when executed by a processor, implementing the method for processing dynamic attributes of a service according to the embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: the embodiment of the invention realizes the general functions of the two interfaces by adding the custom domain interface and the call submission interface, thereby solving the problem that a plurality of sets of codes need to be maintained in the prior art; only a user-defined domain table needs to be configured and maintained, so that a set of codes can support arbitrary expansion, newly added attributes do not need to be separately developed, and development and maintenance cost is reduced; meanwhile, the problems that the project is released again when the program is online and cannot be online immediately are solved, the user-defined domain table is configured at the server side, the client side can directly obtain data through an interface after the configuration is completed, the project is not required to be released again, the program can be online immediately after the configuration is completed, the risk caused by repeated online is avoided, and the maintainability of the program is improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a basic flow of a method of processing dynamic attributes of a service according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of basic modules of an apparatus for processing dynamic attributes of services according to an embodiment of the present invention;
FIG. 3 is a system architecture diagram for handling dynamic attributes of a service according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a new dynamic attribute configuration sample;
FIG. 5 is a diagram illustrating rendering results of a sample of data returned to the front end by the custom domain interface;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a basic flow of a method for processing a dynamic service attribute according to an embodiment of the present invention, and as shown in fig. 1, an embodiment of the present invention provides a method for processing a dynamic service attribute, which is applied to a server and includes:
s101, acquiring a service type through a user-defined domain interface, and determining a dynamic attribute of the service type and a user-defined domain rule thereof from a user-defined domain table according to the service type;
s102, sending the dynamic attribute of the service type through the custom domain interface;
s103, receiving the value of the dynamic attribute of the service type through a submission interface;
and S104, checking whether the value of the dynamic attribute accords with the user-defined domain rule of the service type, and if so, storing the value of the dynamic attribute.
The fixed attribute (i.e., the common attribute) refers to the same attribute between services, for example, a first service has an attribute 1, an attribute 2, and an attribute aa, and a second service has an attribute 1, an attribute 2, and an attribute bb, where the attribute 1 and the attribute 2 are the fixed attributes. The dynamic attribute refers to an attribute of the service other than the fixed attribute, and as in the above example, the attribute aa is a dynamic attribute of the service one, and the attribute bb is a dynamic attribute of the service two. The embodiment of the invention calls the custom domain interface and the submission interface for the configured custom dynamic attribute, solves the problem that a plurality of sets of codes need to be maintained in the prior art, and realizes the general functions of the two interfaces. The submission interface carries out dynamic verification according to the attribute value, a set of codes can support arbitrary expansion only by configuring and maintaining a user-defined domain table, and the interface for submitting the order is universal. And meanwhile, the problems that the project is re-released on line and the project cannot be on line immediately are solved, the user-defined domain table is configured at the server, the client can directly obtain data through an interface after the configuration is finished, the project does not need to be re-released, and the project can be on line immediately after the configuration is finished.
In this embodiment of the present invention, before obtaining the service type obtained through the custom domain interface, the method further includes: and configuring a custom domain table according to the service type, wherein the custom domain table comprises the service type, the corresponding dynamic attribute and the custom domain rule. The embodiment of the invention can realize that a set of codes support arbitrary expansion by configuring the custom domain table, and simultaneously solves the problems that the project is released again when the user is on line and the user cannot be on line instantly.
In the embodiment of the present invention, determining the dynamic attribute of the service type according to the service type includes: according to the client identification (such as an appid application ID or a token in token computer identity authentication) of the service type, checking whether the client is legal; and if the service type is legal, determining the dynamic attribute corresponding to the service type in a user-defined domain table according to the service type. The embodiment of the invention can ensure the data safety and prevent the data from being leaked or stolen by checking the legality of the client.
The embodiment of the invention provides a method for processing dynamic attributes, which is applied to a client and comprises the following steps: sending the service type; calling a custom domain interface to receive the dynamic attribute of the service type; generating a public page according to the fixed attribute and the dynamic attribute of the service type; and obtaining the value of the dynamic attribute of the service type according to the public page, and sending the value of the dynamic attribute. The embodiment of the invention extracts the fixed attribute to form a public page, and embeds the dynamic attribute of the service into the public page, thereby ensuring that one page can adapt to a plurality of services, realizing page universality and solving the problem of high development and maintenance cost.
In the embodiment of the present invention, sending the value of the dynamic attribute includes: converting the format of the value of the dynamic attribute of the service type into a json format; and placing the converted value of the dynamic attribute into a specified hidden domain, and calling a submission interface to send the value to a server by using an http protocol. http (hypertext Transfer protocol) is the most widely used network protocol on the internet of hypertext Transfer protocol. json (JavaScript Object Notation) is a lightweight data exchange format. The conversion into the json format in the embodiment of the invention is convenient for storage, because the attribute is dynamic, the field length and the type cannot be accurately defined, and the json format perfectly solves the problem. Hidden fields are a programming technique that a user cannot see on a page, but can see the source code viewing the page.
In the embodiment of the present invention, invoking a custom domain interface to receive the dynamic attribute of the service type includes: asynchronously inquiring a user-defined domain interface in an ajax mode, and receiving the dynamic attribute of the service type through the user-defined domain interface; and/or generating a public page according to the fixed attribute and the dynamic attribute of the service type, wherein the public page comprises the following steps: acquiring a fixed attribute; and generating a public page through JavaScript rendering according to the fixed attribute and the dynamic attribute of the service type. Ajax (asynchronous Javascript And XML) refers to a web page development technology for creating interactive web page applications. JavaScript is an transliterated script language, which is a dynamic type, weak type, prototype-based language and a built-in support type. The embodiment of the invention can ensure data security, prevent data leakage or data theft and simultaneously can quickly render and generate the page.
Fig. 2 is a schematic diagram of main modules of an apparatus for processing a service dynamic attribute according to an embodiment of the present invention. As shown in fig. 2, an embodiment of the present invention provides an apparatus 200 for processing a dynamic attribute of a service, which is disposed at a server and includes: a determining module 201, configured to: acquiring a service type through a user-defined domain interface, and determining the dynamic attribute of the service type according to the service type; a first sending module 202 configured to: sending the dynamic attribute of the service type through the user-defined domain interface; a first receiving module 203, configured to: receiving a value of a dynamic attribute of the service type through a submission interface; a check saving module 204, configured to: and checking whether the value of the dynamic attribute accords with the user-defined domain rule of the service type, and if so, storing the value of the dynamic attribute. The embodiment of the invention calls the custom domain interface and the submission interface for the configured custom dynamic attribute, solves the problem that a plurality of sets of codes need to be maintained in the prior art, and realizes the general functions of the two interfaces. The submission interface carries out dynamic verification according to the attribute value, a set of codes can support arbitrary expansion only by configuring and maintaining a user-defined domain table, and the interface for submitting the order is universal. And meanwhile, the problems that the project is re-released on line and the project cannot be on line immediately are solved, the user-defined domain table is configured at the server, the client can directly obtain data through an interface after the configuration is finished, the project does not need to be re-released, and the project can be on line immediately after the configuration is finished.
In an embodiment of the present invention, the apparatus further includes a configuration module, configured to: and configuring a custom domain table according to the service type, wherein the custom domain table comprises the service type, the corresponding dynamic attribute and the custom domain rule. The embodiment of the invention can realize that a set of codes support arbitrary expansion by configuring the custom domain table, and simultaneously solves the problems that the project is released again when the user is on line and the user cannot be on line instantly.
In this embodiment of the present invention, the determining module is further configured to: checking whether the client is legal or not according to the client identifier for sending the service type; and if the service type is legal, determining the dynamic attribute corresponding to the service type in a user-defined domain table according to the service type. The embodiment of the invention can ensure the data safety and prevent the data from being leaked or stolen by checking the legality of the client.
The embodiment of the invention provides a device for processing dynamic attributes, which is arranged at a client and comprises: a second sending module, configured to: sending the service type; a second receiving module to: calling a custom domain interface to receive the dynamic attribute of the service type; a page generation module to: generating a public page according to the fixed attribute and the dynamic attribute of the service type; a commit module to: and obtaining the value of the dynamic attribute of the service type according to the public page, and sending the value of the dynamic attribute. The embodiment of the invention extracts the fixed attribute to form a public page, and embeds the dynamic attribute of the service into the public page, thereby ensuring that one page can adapt to a plurality of services, realizing page universality and solving the problem of high development and maintenance cost.
In this embodiment of the present invention, the submitting module is further configured to: converting the format of the value of the dynamic attribute of the service type into a json format; and placing the converted value of the dynamic attribute into a specified hidden domain, and calling a submission interface to send the value to a server by using an http protocol. The conversion into the json format in the embodiment of the invention is convenient for storage, because the attribute is dynamic, the field length and the type cannot be accurately defined, and the json format perfectly solves the problem.
In this embodiment of the present invention, the second receiving module is further configured to: asynchronously inquiring a user-defined domain interface in an ajax mode, and receiving the dynamic attribute of the service type through the user-defined domain interface; and/or the page generation module is also used for: acquiring a fixed attribute; and generating a public page through JavaScript rendering according to the fixed attribute and the dynamic attribute of the service type. The embodiment of the invention can ensure data security, prevent data leakage or data theft and simultaneously can quickly render and generate the page.
Fig. 3 is a schematic diagram of a system architecture for processing dynamic attributes of a service according to an embodiment of the present invention. As shown in fig. 3, the system architecture is divided into four layers: background management, a front end (client), a pseudo server and a database; the method comprises three stages: configuring custom data, calling and rendering a custom domain, and using the custom domain; the following describes the business based on hierarchy.
Background management: the system is a background system for an administrator, and can make dynamic attributes, custom domain rules and the like corresponding to services into a custom domain table and store the custom domain table in a database.
Front end: the final showing end can comprise the forms of web, app and the like; and calling a custom domain interface at the front end, transmitting the service type, obtaining the configuration data in the custom domain table returned by the interface, and rendering to generate a public page.
The interface server side: providing a custom domain interface, acquiring configuration data in a custom domain table from a database after performing related validity check conversion according to the service type transmitted by the front end, and returning the configuration data to the front end; and providing a submission interface, checking the attribute value returned by the front end according to the custom domain rule, and storing the attribute value into a database in a json format after the attribute value passes the check.
A database: the system comprises a cache and a database which are all places for the persistence of the relevant data of a user-defined domain; the cache is used for improving the query efficiency of the interface, and the cache and the data in the database are kept synchronous.
For example, virtual rechargeable goods (non-physical goods, such as a series of virtual rechargeable products like a mobile phone fee rechargeable card and a video website member rechargeable card) in the e-commerce system can be divided into four main dimensions of brand, face value, region and recharging mode, but some virtual rechargeable goods also have other dynamic attributes, such as the zone service attribute of a game, the client attribute of a knowledge service and the like. Therefore, an order confirmation page (a page for selecting or displaying attributes such as brands, face values, regions, recharging modes and the like of commodities, such as a webpage, an app and the like, and submitting an order after determination) cannot be shared, and an order submitting interface is difficult to design uniformly. Take the example of supporting multiple direct charging services, and each direct charging service has its own special attribute (i.e. dynamic attribute). The following is an implementation proposed according to an embodiment of the invention:
a. creating a custom domain table, as shown in table 1:
TABLE 1
Figure BDA0001779926090000101
Figure BDA0001779926090000111
b. The background management terminal carries out configuration according to the user-defined domain table
And the self-localization table is configured according to the service type. Selecting different domain types, dynamically displaying the attribute input box, and displaying 'verification regular' if the domain type is 'text box'; when the field type is "drop-down selection box", the "field value" is displayed. Fig. 4 is a schematic diagram of a sample configuration of a newly added dynamic attribute, as shown in fig. 4, starting from the fifth row (input domain role) and corresponding to table 1: inputting a domain role: field _ role; and (4) displaying a name: field _ name; domain key: field _ key; sorting: field _ sort; the domain type: field _ type; threshold value regularization: field _ val _ reg; and field value error prompt: field _ err _ msg; description of the drawings: field _ desc.
The custom domain table is stored in the database sample as shown in table 2:
TABLE 2
Figure BDA0001779926090000112
Figure BDA0001779926090000121
c. The front end creates a public page (pseudo code) according to the following way
Figure BDA0001779926090000122
Wherein ① is the position of the javaScript rendering dynamic attribute, ② is the attribute value in json format ready to be submitted to the server, and assembled by the javaScript at the time of submission.
Asynchronously inquiring a user-defined domain interface in a page in an ajax mode to obtain a configured json string of a user-defined domain, and rendering the json string to a display block in a page template through JavaScript; and the user fills in the self-defined domain content and selects to submit, converts the self-defined domain value into a json string during submission, places the json string into a specified hidden domain and submits the json string to the server through an http protocol.
The data sample returned to the front end by the custom domain interface is as follows:
Figure BDA0001779926090000131
Figure BDA0001779926090000141
FIG. 5 is a diagram illustrating rendering results of a sample of data returned to the front end by the custom domain interface. As shown in fig. 5, the service type is a mobile phone recharge type, and a user is required to select a system (android or ios) of the mobile phone and input a mobile phone number.
After the user inputs the data, the attribute value of the json format transmitted to the server side through the submitting interface is as follows:
{system:1,mobile:13555555555}
note: the self-defined domain has a domain dynamic method, if the front end has special processing requirements for the self-defined domain, the function can be realized by the method, and the reservation method greatly facilitates the realization of the special processing requirements of the self-defined domain. For example, in some regions, three-level linkage is required, namely, automatic linkage in province, city and county is selected, and automatic linkage in city, city and county is selected, so that the scene needs to be controlled by using the domain dynamic method, and codes are written to realize a linkage mechanism.
The embodiment of the invention uses configuration to make the personalized service into a general system implementation mode, and can realize a general order submitting function by technical means of configuring service custom domain data, extracting an order confirmation page from a template page, adding a custom domain interface and the like. When the new service is accessed, the method does not need to repeatedly develop and confirm the submission page, does not need to add new service characteristic logic, and can be realized only by simply configuring a custom domain in the background; and the new service is immediately effective after being configured, thereby avoiding the risk caused by repeated online and improving the easy maintainability of the program.
Fig. 6 illustrates an exemplary system architecture 600 to which the method for processing dynamic attributes of services or the apparatus for processing dynamic attributes of services of the embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 606. The network 604 is used to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 606. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal device 601, 602, 603 to interact with a server 606 over a network 604 to receive or send messages or the like. Various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like, may be installed on the terminal devices 601, 602, and 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 606 may be a server that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 601, 602, and 603. The background management server can analyze and process the received data such as the product information inquiry request and feed back the processing result to the terminal equipment.
It should be noted that the method for processing the dynamic service attribute provided in the embodiment of the present invention is generally executed by the server 606, and accordingly, the apparatus for processing the dynamic service attribute is generally disposed in the server 606.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The invention also provides an electronic device and a computer readable medium according to the embodiment of the invention.
The electronic device of the embodiment of the invention comprises: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing the service dynamic attribute provided by the embodiment of the invention.
The computer readable medium of the embodiment of the present invention stores thereon a computer program, and the program, when executed by a processor, implements the method for processing dynamic attributes of a service according to the embodiment of the present invention.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a central processing module (CPU)701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the system 700 are also stored. The CPU701, the ROM702, and the RAM703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 707 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the central processing module (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises a determining module, a first sending module, a first receiving module and a checking and storing module. The names of these modules do not in some cases form a limitation on the module itself, for example, the check save module may also be described as a "module that checks the value of the dynamic attribute".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: s101, acquiring a service type through a user-defined domain interface, and determining a dynamic attribute of the service type and a user-defined domain rule thereof from a user-defined domain table according to the service type; s102, sending the dynamic attribute of the service type through the custom domain interface; s103, receiving the value of the dynamic attribute of the service type through a submission interface; and S104, checking whether the value of the dynamic attribute accords with the user-defined domain rule of the service type, and if so, storing the value of the dynamic attribute.
According to the technical scheme of the embodiment of the invention, the problem that a plurality of sets of codes need to be maintained in the prior art is solved by adding the custom domain interface and the call submission interface, and the functions of the two interfaces are universal. The submission interface carries out dynamic verification according to the attribute value, a set of codes can support arbitrary expansion only by configuring and maintaining a user-defined domain table, and the interface for submitting the order is universal. Meanwhile, the problems that the project is released again when the program is online and cannot be online immediately are solved, the user-defined domain table is configured at the server side, the client side can directly obtain data through an interface after the configuration is completed, the project is not required to be released again, the program can be online immediately after the configuration is completed, the risk caused by repeated online is avoided, and the maintainability of the program is improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A method for processing dynamic attributes of services, applied to a server, includes:
acquiring a service type through a user-defined domain interface, and determining the dynamic attribute of the service type and a user-defined domain rule thereof from a user-defined domain table according to the service type;
sending the dynamic attribute of the service type through the user-defined domain interface;
receiving a value of a dynamic attribute of the service type through a submission interface;
and checking whether the value of the dynamic attribute accords with the user-defined domain rule of the service type, and if so, storing the value of the dynamic attribute.
2. The method of claim 1, wherein prior to obtaining the service type via the custom domain interface, the method further comprises:
and configuring a custom domain table according to the service type, wherein the custom domain table comprises the service type, the corresponding dynamic attribute and the custom domain rule.
3. The method of claim 2, wherein determining the dynamic attribute of the service type according to the service type comprises:
checking whether the client is legal or not according to the client identifier for sending the service type;
and if the service type is legal, determining the dynamic attribute corresponding to the service type in a user-defined domain table according to the service type.
4. A method for processing dynamic attributes, applied to a client, includes:
sending the service type;
calling a custom domain interface to receive the dynamic attribute of the service type;
generating a public page according to the fixed attribute and the dynamic attribute of the service type;
and obtaining the value of the dynamic attribute of the service type according to the public page, and sending the value of the dynamic attribute.
5. The method of claim 4, wherein sending the value of the dynamic attribute comprises:
converting the format of the value of the dynamic attribute of the service type into a json format;
and placing the converted value of the dynamic attribute into a specified hidden field, and calling a submission interface to send the value to a server by using a hypertext transfer protocol.
6. The method of claim 4, wherein invoking a custom domain interface to receive the dynamic attribute of the service type comprises:
asynchronously inquiring a user-defined domain interface in an ajax mode, and receiving the dynamic attribute of the service type through the user-defined domain interface;
and/or
Generating a public page according to the fixed attribute and the dynamic attribute of the service type, wherein the public page comprises the following steps:
acquiring a fixed attribute;
and generating a public page through JavaScript rendering according to the fixed attribute and the dynamic attribute of the service type.
7. An apparatus for processing dynamic attributes of services, configured at a server, includes:
a determination module to: acquiring a service type through a user-defined domain interface, and determining the dynamic attribute of the service type and a user-defined domain rule thereof from a user-defined domain table according to the service type;
a first sending module configured to: sending the dynamic attribute of the service type through the user-defined domain interface;
a first receiving module to: receiving a value of a dynamic attribute of the service type through a submission interface;
a check save module for: and checking whether the value of the dynamic attribute accords with the user-defined domain rule of the service type, and if so, storing the value of the dynamic attribute.
8. The apparatus of claim 7, further comprising a configuration module to:
and configuring a custom domain table according to the service type, wherein the custom domain table comprises the service type, the corresponding dynamic attribute and the custom domain rule.
9. The apparatus of claim 8, wherein the determining module is further configured to:
checking whether the client is legal or not according to the client identifier for sending the service type;
and if the service type is legal, determining the dynamic attribute corresponding to the service type in a user-defined domain table according to the service type.
10. An apparatus for processing dynamic attributes, provided at a client, includes:
a second sending module, configured to: sending the service type;
a second receiving module to: calling a custom domain interface to receive the dynamic attribute of the service type;
a page generation module to: generating a public page according to the fixed attribute and the dynamic attribute of the service type;
a commit module to: and obtaining the value of the dynamic attribute of the service type according to the public page, and sending the value of the dynamic attribute.
11. The apparatus of claim 10, wherein the submit module is further configured to:
converting the format of the value of the dynamic attribute of the service type into a json format;
and placing the converted value of the dynamic attribute into a specified hidden field, and calling a submission interface to send the value to a server by using a hypertext transfer protocol.
12. The method of claim 10, wherein the second receiving module is further configured to:
asynchronously inquiring a user-defined domain interface in an ajax mode, and receiving the dynamic attribute of the service type through the user-defined domain interface;
and/or
The page generation module is further configured to:
acquiring a fixed attribute;
and generating a public page through JavaScript rendering according to the fixed attribute and the dynamic attribute of the service type.
13. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201810986994.7A 2018-08-28 2018-08-28 Method and device for processing dynamic attributes of services Pending CN110865797A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810986994.7A CN110865797A (en) 2018-08-28 2018-08-28 Method and device for processing dynamic attributes of services

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810986994.7A CN110865797A (en) 2018-08-28 2018-08-28 Method and device for processing dynamic attributes of services

Publications (1)

Publication Number Publication Date
CN110865797A true CN110865797A (en) 2020-03-06

Family

ID=69651386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810986994.7A Pending CN110865797A (en) 2018-08-28 2018-08-28 Method and device for processing dynamic attributes of services

Country Status (1)

Country Link
CN (1) CN110865797A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522616A (en) * 2020-04-24 2020-08-11 北京思特奇信息技术股份有限公司 Page change method and device
CN112445470A (en) * 2020-11-11 2021-03-05 北京思特奇信息技术股份有限公司 Dynamic rule creating method and system based on newly added scene
CN113312075A (en) * 2021-06-25 2021-08-27 上海致景信息科技有限公司 Configuration information issuing method and device, storage medium and processor

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101359290A (en) * 2008-09-11 2009-02-04 中兴通讯股份有限公司 Method for customizing service document based on metadata and apparatus
CN101908046A (en) * 2009-06-05 2010-12-08 北大方正集团有限公司 Service processing method and system
CN103019684A (en) * 2012-11-20 2013-04-03 北京思特奇信息技术股份有限公司 Dynamic template-based business page configuring method
CN103218707A (en) * 2013-04-10 2013-07-24 沈阳昭软软件有限公司 Method for achieving dynamic form in workflow system
US20150100417A1 (en) * 2013-05-30 2015-04-09 Visa International Service Association Dynamic Checkout Button Apparatuses, Methods and Systems
CN108196879A (en) * 2018-01-09 2018-06-22 平安科技(深圳)有限公司 Method for processing business, device, equipment and computer readable storage medium
CN108268531A (en) * 2016-12-30 2018-07-10 上海华讯网络系统有限公司 The configuration system and method for dynamic definition configuration management database

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101359290A (en) * 2008-09-11 2009-02-04 中兴通讯股份有限公司 Method for customizing service document based on metadata and apparatus
CN101908046A (en) * 2009-06-05 2010-12-08 北大方正集团有限公司 Service processing method and system
CN103019684A (en) * 2012-11-20 2013-04-03 北京思特奇信息技术股份有限公司 Dynamic template-based business page configuring method
CN103218707A (en) * 2013-04-10 2013-07-24 沈阳昭软软件有限公司 Method for achieving dynamic form in workflow system
US20150100417A1 (en) * 2013-05-30 2015-04-09 Visa International Service Association Dynamic Checkout Button Apparatuses, Methods and Systems
CN108268531A (en) * 2016-12-30 2018-07-10 上海华讯网络系统有限公司 The configuration system and method for dynamic definition configuration management database
CN108196879A (en) * 2018-01-09 2018-06-22 平安科技(深圳)有限公司 Method for processing business, device, equipment and computer readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522616A (en) * 2020-04-24 2020-08-11 北京思特奇信息技术股份有限公司 Page change method and device
CN112445470A (en) * 2020-11-11 2021-03-05 北京思特奇信息技术股份有限公司 Dynamic rule creating method and system based on newly added scene
CN112445470B (en) * 2020-11-11 2023-11-07 北京思特奇信息技术股份有限公司 Dynamic rule creation method and system based on newly added scene
CN113312075A (en) * 2021-06-25 2021-08-27 上海致景信息科技有限公司 Configuration information issuing method and device, storage medium and processor

Similar Documents

Publication Publication Date Title
CN111125496B (en) Price query method, device and system
CN109901987B (en) Method and device for generating test data
CN113076153B (en) Interface calling method and device
CN110865797A (en) Method and device for processing dynamic attributes of services
CN110706093A (en) Accounting processing method and device
CN109062560B (en) Method and apparatus for generating information
CN115587575A (en) Data table creation method, target data query method, device and equipment
CN111881329A (en) Account balance management method and system
CN110928594A (en) Service development method and platform
CN110888869A (en) Data processing method and device
CN112948138A (en) Method and device for processing message
US20230222502A1 (en) System and method for creating and issuing virtual transaction instruments
CN114896244A (en) Method, device and equipment for configuring database table and computer readable medium
CN113392093A (en) Service processing method and device, electronic equipment and computer readable medium
CN113822745A (en) Article display method and device
CN111131354B (en) Method and apparatus for generating information
CN112559646A (en) Report downloading method and device
CN112884427A (en) Process management method and device supporting multiple service sources
CN113704222A (en) Method and device for processing service request
CN112860858A (en) Method and device for answering questions
CN111401840B (en) Method, apparatus, device and computer readable medium for generating guarantor information
CN110781523B (en) Method and apparatus for processing information
CN116108132B (en) Method and device for auditing text of short message
CN111291038B (en) Data query method and device
CN109344318B (en) Method and apparatus for processing information

Legal Events

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