CN113347220B - Inter-service data sharing method, device, server and medium - Google Patents

Inter-service data sharing method, device, server and medium Download PDF

Info

Publication number
CN113347220B
CN113347220B CN202010136696.6A CN202010136696A CN113347220B CN 113347220 B CN113347220 B CN 113347220B CN 202010136696 A CN202010136696 A CN 202010136696A CN 113347220 B CN113347220 B CN 113347220B
Authority
CN
China
Prior art keywords
data
executed
database
label
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010136696.6A
Other languages
Chinese (zh)
Other versions
CN113347220A (en
Inventor
杜孟孟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010136696.6A priority Critical patent/CN113347220B/en
Publication of CN113347220A publication Critical patent/CN113347220A/en
Application granted granted Critical
Publication of CN113347220B publication Critical patent/CN113347220B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Library & Information Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the invention provides a method, a device, a server and a medium for sharing data among services, relates to the technical field of communication, and can reduce the coupling degree among the services. The scheme of the embodiment of the invention comprises the following steps: when a data request is received, specified data is acquired. The designated data is data required by the called party service of the data request to be processed to execute the preset operation. And then generating a label corresponding to the specified data, and storing the specified data and the label into a database correspondingly. And then sending the label to the called party service, so that the called party service searches and acquires the data required by the called party service for executing the preset operation by taking the label as an index from the database.

Description

Inter-service data sharing method, device, server and medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a server, and a medium for sharing data between services.
Background
When a server side processes a request sent by a client side, multiple services are often required to be processed together, so that mutual calling among the services is required, when the services are called among the services, a caller service needs to pull a callee service, the callee service is mapped to a local machine, and data required by the callee service to execute preset operation is acquired. And then, transmitting the data required by the called party into the called party service according to the specified sequence and the specified data type for the called party service to use, thereby achieving the purpose of data sharing.
After the data required by the called party service execution program is modified, when the calling party service maps the data required by the called party service, the data required by the called party service is not matched with the data acquired by the calling party service, so that the program is reported in error. For example, the called party service program needs data A, B and C after modification, and the calling party service only acquires data a and B, so that the calling party service cannot send data C to the called party service and further cannot call the called party service. In order to enable the caller service to invoke the modified called service, the caller program involved in the caller service calling the called service needs to be modified, and as the coupling between the caller service program and the called service program in the related art is severe, the number of caller programs involved in the modification process is large, the caller programs need to be modified integrally, and the change of the caller service program is large.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a server, and a medium for sharing data between services, so as to reduce the degree of coupling between services. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for sharing data between services, where the method is applied to a caller server, and the method includes:
when a data request is received, acquiring specified data, wherein the specified data is data required by a called party service to be processed with the data request to execute preset operation;
generating a label corresponding to the specified data, and correspondingly storing the specified data and the label to a database;
and sending the label to the called party service, so that the called party service searches and acquires the data required by the called party service for executing the preset operation from the database by taking the label as an index.
Optionally, the generating a label corresponding to the specified data includes:
and generating a label corresponding to the specified data by using a preset label generation algorithm according to the current moment and the equipment identifier of the caller server.
Optionally, the storing the specified data and the tag in a database correspondingly includes:
and correspondingly storing the label and a plurality of key value pairs into the database, wherein each key value pair comprises a specified data and a data identifier corresponding to the specified data.
In a second aspect, an embodiment of the present invention provides an inter-service data sharing method, which is applied to a called server, and the method includes:
receiving a label sent by a caller service;
searching and acquiring data to be executed from a database by taking the tag as an index, wherein the data to be executed is data required for executing the preset operation;
and if the data to be executed of the specified type is searched from the database, executing preset operation according to the data to be executed.
Optionally, the database includes a corresponding relationship between the tag and a plurality of key-value pairs, where each key-value pair includes a piece of specific data and a data identifier corresponding to the specific data; the searching and obtaining the data to be executed by taking the label as an index from the database comprises the following steps:
searching a plurality of key value pairs corresponding to the labels from the database;
and searching and acquiring the data to be executed corresponding to the data identification to be executed from a plurality of key value pairs corresponding to the label.
Optionally, after the to-be-executed data is searched and obtained from the database by using the tag as an index, the method further includes:
and if the specified type of data to be executed is not found from the database, sending an alarm message to the caller service, wherein the alarm message is used for indicating that the specified data corresponding to the tag is not matched with the data required for executing the preset operation.
In a third aspect, an embodiment of the present invention provides an inter-service data sharing apparatus, which is applied to a caller server, where the apparatus includes:
the data processing device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring specified data when a data request is received, and the specified data is data required by a called party service to be processed with the data request to execute preset operation;
the generation module is used for generating a label corresponding to the specified data and correspondingly storing the specified data and the label to a database;
and the sending module is used for sending the label to the called party service so that the called party service searches and obtains data required by the called party service for executing the preset operation from the database by taking the label as an index.
Optionally, the generating module is specifically configured to:
and generating a label corresponding to the specified data by using a preset label generation algorithm according to the current time and the equipment identifier of the caller server.
Optionally, the generating module is specifically configured to:
and correspondingly storing the label and a plurality of key value pairs into the database, wherein each key value pair comprises a specified data and a data identifier corresponding to the specified data.
In a fourth aspect, an embodiment of the present invention provides an inter-service data sharing apparatus, which is applied to a callee server, and the apparatus includes:
the receiving module is used for receiving the label sent by the caller service;
the searching module is used for searching and acquiring data to be executed from a database by taking the tag as an index, wherein the data to be executed is data required for executing the preset operation;
and the execution module is used for executing preset operation according to the data to be executed if the data to be executed of the specified type is searched from the database.
Optionally, the database includes a corresponding relationship between the tag and multiple key-value pairs, where each key-value pair includes an appointed data and a data identifier corresponding to the appointed data; the search module is specifically configured to:
searching a plurality of key value pairs corresponding to the labels from the database;
and searching and acquiring the data to be executed corresponding to the data identification to be executed from a plurality of key value pairs corresponding to the label.
Optionally, the apparatus further comprises: a sending module;
the sending module is configured to send an alarm message to the caller service after the data to be executed is searched and acquired from the slave database by using the tag as an index, if the data to be executed of the specified type is not searched from the database, where the alarm message is used to indicate that the specified data corresponding to the tag is not matched with the data required for executing the preset operation.
In a fifth aspect, an embodiment of the present invention provides a caller server, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the caller server through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the steps of the inter-service data sharing method according to the first aspect when executing the program stored in the memory.
In a sixth aspect, an embodiment of the present invention provides a called party server, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the called party server through the communication bus;
a memory for storing a computer program;
and a processor, configured to implement the steps of the inter-service data sharing method according to the second aspect when executing the program stored in the memory.
In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of the inter-service data sharing method according to the first aspect.
In an eighth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of the inter-service data sharing method according to the second aspect.
In a ninth aspect, an embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the inter-service data sharing method according to the first aspect.
In a tenth aspect, an embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the inter-service data sharing method described in the second aspect.
The technical scheme of the embodiment of the invention can at least bring the following beneficial effects: because the caller service records the specified data required by the callee service in the database when calling the callee service, the tag corresponding to the specified data of the callee service is transmitted, and the callee service can acquire the specified data from the database according to the tag. So that the data passed when the caller service invokes the callee service is a tag, regardless of the change in the data needed by the callee service. Therefore, the embodiment of the invention reduces the coupling degree between the services, so that the calling party service does not need to modify the program related to calling the called party service after the data required by the called party to execute the preset operation is changed.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an inter-service data sharing system according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for sharing data between services according to an embodiment of the present invention;
FIG. 3 is a flowchart of another inter-service data sharing method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an inter-service data sharing apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of another inter-service data sharing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a caller server according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a callee server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a system for sharing data between services according to an embodiment of the present invention, where the system includes a caller server 101 and a callee server 102.
In the embodiment of the present invention, a server that calls another service is referred to as a caller server, and a service that executes a caller program in the caller server is referred to as a caller service. The server called by the other service is called the callee server, and the service called in the callee server is called the callee service.
The caller server 101 is used to invoke other services.
The callee server 102 is used to perform a preset operation when called by another service.
The number of each device included in the inter-service data sharing system shown in fig. 1 is only one example provided in the embodiment of the present invention, and the number of each device included in the inter-service data sharing system is not specifically limited in the embodiment of the present invention.
Referring to fig. 2, an embodiment of the present invention provides an inter-service data sharing method, which is applied to a caller server of the inter-service data sharing system shown in fig. 1, and the method includes the following steps.
In step 201, when a data request is received, specified data is acquired.
The designated data is data required by the called party service of the data request to be processed to execute the preset operation.
Optionally, the number of the called party services of the data request to be processed may be one or more, and when one called party service is included, the data is specified as the data required by the calling service to perform the preset operation. When a plurality of callee services are included, data is specified as data required for the plurality of callee services to perform respective preset operations.
Step 202, generating a label corresponding to the specified data, and storing the specified data and the label into a database correspondingly.
And step 203, sending the tag to the called party service, so that the called party service searches and acquires the data required by the called party service to execute the preset operation from the database by taking the tag as an index.
The technical scheme of the embodiment of the invention can at least bring the following beneficial effects: when the caller service calls the callee service, the specified data required by the callee service is recorded in the database, and a tag corresponding to the specified data transmitted to the callee service is transmitted, so that the callee service can acquire the specified data from the database according to the tag. So that the data passed when the caller service invokes the callee service is a tag, regardless of the change in the data needed by the callee service. Therefore, the embodiment of the invention reduces the coupling degree between the services, so that the calling party service does not need to modify the program related to calling the called party service after the data required by the called party to execute the preset operation is changed.
Optionally, the manner of generating the tag in step 202 may include: and generating a label corresponding to the specified data by using a preset label generation algorithm according to the current time and the equipment identifier of the caller server.
For example, the tag may be a Universally Unique identification code (UUID), which is generated by a UUID generation algorithm according to the current date and time, the clock sequence, and the Institute of Electrical and Electronics Engineers (IEEE) of the calling server.
The technical scheme of the embodiment of the invention can also bring the following beneficial effects: the generated label can uniquely identify each appointed data stored in the database at this time, so that the called party service can accurately acquire the data required to be acquired for processing the data request according to the label, and the accuracy of data sharing among services is improved.
Compared with the mode of sending the data required by the called party to the called party in the prior art, the method and the system for sending the label to the called party service have the advantages that the label can be sent to the called party service when the calling party server calls the called party server, so that the data volume transmitted by the method and the system for sending the label to the called party service is smaller, and the hardware overhead and the network overhead of calling between services are reduced.
Optionally, the manner of storing the designated data and the tag in the database in the step 202 includes: and storing the label and a plurality of key value pairs into a database correspondingly. Each key-value pair comprises a piece of specified data and a data identifier corresponding to the specified data.
For example, the database stores [ KEY1- (KEY 1, a), (KEY 2, B), (KEY 3, C) ], where KEY1 denotes a tag, KEY1, KEY2, and KEY3 denote data identifications, and A, B and C denote specified data.
The technical scheme of the embodiment of the invention can also bring the following beneficial effects: because each designated data in the database corresponds to the data identifier, when the caller service searches the designated data from the database, the data corresponding to the data identifier to be executed can be acquired as required.
Referring to fig. 3, an embodiment of the present invention provides an inter-service data sharing method, which may be applied to a callee server of the inter-service data sharing system shown in fig. 1, and the method includes the following steps.
Step 301, receiving a tag sent by a caller service.
Step 302, using the tag as an index to search and obtain data to be executed from the database.
The data to be executed is data required for executing a preset operation.
Step 303, if the data to be executed of the specified type is found from the database, executing a preset operation according to the data to be executed.
The technical scheme of the embodiment of the invention can at least bring the following beneficial effects: the called party server can search and obtain the data to be executed corresponding to the label from the database according to the label sent by the calling party service, and execute preset operation according to the data to be executed when the specified type of data to be executed is searched from the database. Regardless of the change of the data required by the callee service, the data passed when the caller service invokes the callee service is a tag. Therefore, the embodiment of the invention reduces the coupling degree between the services, so that the calling party service does not need to modify the program related to calling the called party service after the data required by the called party to execute the preset operation is changed.
In the embodiment of the present invention, the specified data stored in the database may further have a data identifier corresponding to itself, where the database includes a correspondence between a tag and multiple key-value pairs, and each key-value pair includes one specified data and a data identifier corresponding to the specified data.
Optionally, the manner for searching and acquiring the data to be executed in step 302 includes: and searching a plurality of key value pairs corresponding to the labels from the database, and then searching and acquiring the data to be executed corresponding to the data identification to be executed from the plurality of key value pairs corresponding to the labels.
For example, the KEY value pair corresponding to the label KEY is (KEY 1, a), (KEY 2, B), and (KEY 3, C), and the preset data to be executed is identified as KEY1, then the data to be executed a is acquired.
Illustratively, the data identifier may be a name, password, or region of belongings, etc.
The technical scheme of the embodiment of the invention can also bring the following beneficial effects: the data identifier of the specified data can represent the semantics represented by the specified data, so that when the called party service acquires the data from the database, the data to be executed required for executing the preset operation of the called party service can be acquired, and the application range of the embodiment of the invention is wider.
Optionally, after step 303, if the called server does not find the data to be executed of the specified type from the database, an alarm message is sent to the calling server. The alarm message is used for indicating that the designated data corresponding to the label is not matched with the data required for executing the preset operation.
The step of finding the data to be executed of the specified type from the database comprises the following steps: and finding out all data to be executed which need to be found from the database, and/or finding out any type of the data to be executed from the database, wherein the type of the data to be executed is not a specified type corresponding to the data identification to be executed.
For example, the key-value pair corresponding to the tag sent by the caller service includes (username, a) and (password, 123).
Assuming that the to-be-executed data identifier is a user name and a region to which the to-be-executed data identifier belongs, and the key value pair corresponding to the tag does not include the data identifier as specified data of the region to which the data identifier belongs, it is determined that all the to-be-executed data which needs to be searched is not searched from the database.
Assuming that the data identifier to be executed is a user name and a password, the specified type of the user name is string, the specified type of the password is string, and the type of the password 123 corresponding to the tag is integer (int), so that it is determined that the type of the data to be executed is not the specified type corresponding to the data identifier to be executed.
Optionally, when the caller service receives the alarm message, the alarm message may be displayed or sent to a designated user terminal, so that the user upgrades the caller service according to the alarm message. Upgrading the caller service may include: updating the data identification of the specified data which needs to be acquired by the caller service, and/or updating the data type of the specified data.
For example, the caller service before update needs to obtain the name of string type, and the caller service after update needs to obtain the name of string type and the password of int type.
The technical scheme of the embodiment of the disclosure can also bring the following beneficial effects: the called party service can send the alarm message to the calling party service when the specified type of data to be executed is not found in the database, so that the calling party service can be updated in time to ensure that the called service can be successfully called.
Corresponding to the above method embodiment, referring to fig. 4, an embodiment of the present invention provides an inter-service data sharing apparatus, applied to a caller server, including: an acquisition module 401, a generation module 402 and a sending module 403;
an obtaining module 401, configured to obtain specified data when a data request is received, where the specified data is data required by a callee service of the data request to be processed to perform a preset operation;
a generating module 402, configured to generate a tag corresponding to the specified data, and store the specified data and the tag in a database correspondingly;
and a sending module 403, configured to send the tag to the callee service, so that the callee service searches and obtains data required by the callee service to perform the preset operation from the database by using the tag as an index.
Optionally, the generating module 402 may be specifically configured to:
and generating a label corresponding to the specified data by using a preset label generation algorithm according to the current time and the equipment identifier of the caller server.
Optionally, the generating module 402 may be specifically configured to:
and storing the label and a plurality of key value pairs into a database correspondingly, wherein each key value pair comprises appointed data and a data identifier corresponding to the appointed data.
Corresponding to the above method embodiment, referring to fig. 5, an embodiment of the present invention provides an inter-service data sharing apparatus, applied to a callee server, where the apparatus includes: a receiving module 501, a searching module 502 and an executing module 503;
a receiving module 501, configured to receive a tag sent by a caller service;
the searching module 502 is configured to search and acquire data to be executed from a database by using the tag as an index, where the data to be executed is data required for executing a preset operation;
the executing module 503 is configured to execute a preset operation according to the data to be executed if the data to be executed of the specified type is found from the database.
Optionally, the database includes a corresponding relationship between the tag and a plurality of key-value pairs, and each key-value pair includes one piece of specified data and a data identifier corresponding to the specified data; the search module 502 may be specifically configured to:
searching a plurality of key value pairs corresponding to the labels from a database;
and searching and acquiring the data to be executed corresponding to the data identification to be executed from a plurality of key value pairs corresponding to the labels.
Optionally, the apparatus may further include: a sending module;
and the sending module is used for sending an alarm message to the caller service after the data to be executed is searched and obtained from the database by taking the tag as an index and if the data to be executed of the specified type is not searched from the database, wherein the alarm message is used for indicating that the specified data corresponding to the tag is not matched with the data required for executing the preset operation.
The embodiment of the present invention further provides a caller server, as shown in fig. 6, which includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the steps executed by the caller server in the foregoing method embodiment when executing the program stored in the memory 603.
The embodiment of the present invention further provides a called party server, as shown in fig. 7, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 complete mutual communication through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to implement the steps executed by the callee server in the foregoing method embodiment when executing the program stored in the memory 703.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, which, when executed by a processor, implements the steps of the inter-service data sharing method performed by a caller service described above.
In another embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the inter-service data sharing method performed by a callee service.
In yet another embodiment provided by the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the inter-service data sharing method performed by the caller service in the above embodiment.
In yet another embodiment provided by the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the inter-service data sharing method performed by the callee service in the above embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. An inter-service data sharing method applied to a caller server, the method comprising:
when a data request is received, acquiring specified data, wherein the specified data is data required by a called party service to be processed with the data request to execute preset operation;
generating a label corresponding to the specified data, and storing the label and a plurality of key value pairs into a database correspondingly, wherein each key value pair comprises the specified data and a data identifier corresponding to the specified data;
and sending the label to the called party service, so that the called party service searches and acquires the data required by the called party service for executing the preset operation from the database by taking the label as an index.
2. The method according to claim 1, wherein the generating the label corresponding to the specified data comprises:
and generating a label corresponding to the specified data by using a preset label generation algorithm according to the current time and the equipment identifier of the caller server.
3. An inter-service data sharing method applied to a called server, the method comprising:
receiving a label sent by a caller service;
searching and acquiring data to be executed from a database by taking the tag as an index, wherein the data to be executed is data required by executing preset operation;
if the data to be executed of the specified type is searched from the database, executing preset operation according to the data to be executed;
the database comprises corresponding relations between the labels and a plurality of key value pairs, and each key value pair comprises appointed data and a data identifier corresponding to the appointed data; the searching and obtaining the data to be executed by using the label as the index in the slave database comprises the following steps:
searching a plurality of key value pairs corresponding to the labels from the database;
and searching and acquiring the data to be executed corresponding to the data identification to be executed from a plurality of key value pairs corresponding to the label.
4. The method of claim 3, wherein after the searching and retrieving the data to be executed from the database using the tag as an index, the method further comprises:
and if the specified type of data to be executed is not found from the database, sending an alarm message to the caller service, wherein the alarm message is used for indicating that the specified data corresponding to the tag is not matched with the data required for executing the preset operation.
5. An inter-service data sharing apparatus applied to a caller server, the apparatus comprising:
the data processing device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring specified data when a data request is received, and the specified data is data required by a called party service to be processed with the data request to execute preset operation;
the generation module is used for generating a label corresponding to the specified data and storing the label and a plurality of key value pairs into a database correspondingly, wherein each key value pair comprises the specified data and a data identifier corresponding to the specified data;
and the sending module is used for sending the label to the called party service so that the called party service searches and obtains data required by the called party service for executing the preset operation from the database by taking the label as an index.
6. The apparatus according to claim 5, wherein the generating module is specifically configured to:
and generating a label corresponding to the specified data by using a preset label generation algorithm according to the current time and the equipment identifier of the caller server.
7. An inter-service data sharing apparatus applied to a callee server, the apparatus comprising:
the receiving module is used for receiving the label sent by the caller service;
the searching module is used for searching and acquiring data to be executed from a database by taking the tag as an index, wherein the data to be executed is data required by executing preset operation;
the execution module is used for executing preset operation according to the data to be executed if the data to be executed of the specified type is searched from the database;
the database comprises corresponding relations between the labels and a plurality of key value pairs, and each key value pair comprises appointed data and a data identifier corresponding to the appointed data; the search module is specifically configured to:
searching a plurality of key value pairs corresponding to the labels from the database;
and searching and acquiring the data to be executed corresponding to the data identification to be executed from a plurality of key value pairs corresponding to the label.
8. The apparatus of claim 7, further comprising: a sending module;
the sending module is configured to, after the data to be executed is searched and obtained from the slave database by using the tag as an index, send an alarm message to the caller service if the data to be executed of a specified type is not searched from the database, where the alarm message is used to indicate that the specified data corresponding to the tag is not matched with the data required for executing the preset operation.
9. A caller server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for completing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method of any one of claims 1-2 when executing a program stored in a memory.
10. The called party server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method of any one of claims 3 to 4 when executing a program stored in a memory.
11. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1-2.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method of any one of claims 3-4.
CN202010136696.6A 2020-03-02 2020-03-02 Inter-service data sharing method, device, server and medium Active CN113347220B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010136696.6A CN113347220B (en) 2020-03-02 2020-03-02 Inter-service data sharing method, device, server and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010136696.6A CN113347220B (en) 2020-03-02 2020-03-02 Inter-service data sharing method, device, server and medium

Publications (2)

Publication Number Publication Date
CN113347220A CN113347220A (en) 2021-09-03
CN113347220B true CN113347220B (en) 2022-10-04

Family

ID=77467220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010136696.6A Active CN113347220B (en) 2020-03-02 2020-03-02 Inter-service data sharing method, device, server and medium

Country Status (1)

Country Link
CN (1) CN113347220B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107346315A (en) * 2016-05-06 2017-11-14 曲立东 The structure and application process of object data association index system and the system
CN108520073A (en) * 2018-04-13 2018-09-11 深圳壹账通智能科技有限公司 Air control data integration method, device, equipment and computer readable storage medium
CN110659283A (en) * 2019-08-15 2020-01-07 中国平安财产保险股份有限公司 Data label processing method and device, computer equipment and storage medium
CN110704486A (en) * 2019-09-27 2020-01-17 支付宝(杭州)信息技术有限公司 Data processing method, device, system, storage medium and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101399652B1 (en) * 2007-11-21 2014-06-27 삼성전기주식회사 Silicate phosphor and white light emitting device including silicate phosphor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107346315A (en) * 2016-05-06 2017-11-14 曲立东 The structure and application process of object data association index system and the system
CN108520073A (en) * 2018-04-13 2018-09-11 深圳壹账通智能科技有限公司 Air control data integration method, device, equipment and computer readable storage medium
CN110659283A (en) * 2019-08-15 2020-01-07 中国平安财产保险股份有限公司 Data label processing method and device, computer equipment and storage medium
CN110704486A (en) * 2019-09-27 2020-01-17 支付宝(杭州)信息技术有限公司 Data processing method, device, system, storage medium and server

Also Published As

Publication number Publication date
CN113347220A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
US11310066B2 (en) Method and apparatus for pushing information
CN111522927B (en) Entity query method and device based on knowledge graph
CN111800513B (en) Method and device for pushing information and computer readable medium of electronic equipment
CN109672608B (en) Method for transmitting messages according to time
US10666720B2 (en) Maintenance of persistent master identifier for clusters of user identifiers across a plurality of devices
CN112256318B (en) Construction method and equipment for dependent product
CN111061498A (en) Configuration information management system
CN113760948A (en) Data query method and device
CN110427538B (en) Data query method, data storage method, data query device, data storage device and electronic equipment
CN113347220B (en) Inter-service data sharing method, device, server and medium
CN113821521A (en) Distributed identification generation method and device, electronic equipment and storage medium
CN110515909B (en) File storage method and device, electronic equipment and computer storage medium
CN111309693A (en) Data synchronization method, device and system, electronic equipment and storage medium
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN112130860B (en) JSON object analysis method and device, electronic equipment and storage medium
CN112783903B (en) Method and device for generating update log
CN109254855B (en) Registration method and device of parameter transmission protocol and electronic equipment
CN112506740B (en) Cloud alarm method, electronic equipment, storage medium and cloud alarm device
CN111787007B (en) Information processing method, information processing device, electronic equipment and storage medium
CN112948225A (en) Link monitoring method and device, monitoring equipment and storage medium
CN114860557B (en) User behavior information generation method, device, equipment and readable storage medium
CN108322380B (en) Method and device for calling data and method and device for pushing information
CN112667447B (en) Data restoration method and device
CN113190465B (en) Test information processing method, device, equipment and storage medium
CN116305288B (en) Method, device, equipment and storage medium for isolating database resources

Legal Events

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